Merge pull request #1466 from sbwalker/dev
back out auth policy header support as Blazor HttpClient is registered as Scoped and can not support variable headers
This commit is contained in:
		| @ -27,17 +27,6 @@ namespace Oqtane.Controllers | ||||
|                     _authEntityId.Add(param.Key.Substring(4, param.Key.Length - 6), value); | ||||
|                 } | ||||
|             } | ||||
|             // if policy authorization dictionary is empty populate from headers | ||||
|             if (_authEntityId.Count == 0) | ||||
|             { | ||||
|                 foreach (var param in accessor.HttpContext.Request.Headers) | ||||
|                 { | ||||
|                     if (param.Key.StartsWith("auth") && param.Key.EndsWith("id") && int.TryParse(param.Value, out value)) | ||||
|                     { | ||||
|                         _authEntityId.Add(param.Key.Substring(4, param.Key.Length - 6), value); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|             // legacy support | ||||
|             if (_authEntityId.Count == 0 && accessor.HttpContext.Request.Query.ContainsKey("entityid")) | ||||
|  | ||||
| @ -19,7 +19,7 @@ namespace Oqtane.Migrations.Tenant | ||||
|             var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|  | ||||
|             pageEntityBuilder.AddBooleanColumn("IsClickable"); | ||||
|             pageEntityBuilder.UpdateColumn("IsClickable", "true"); | ||||
|             pageEntityBuilder.UpdateColumn("IsClickable", "1"); | ||||
|         } | ||||
|  | ||||
|         protected override void Down(MigrationBuilder migrationBuilder) | ||||
|  | ||||
| @ -35,16 +35,6 @@ namespace Oqtane.Security | ||||
|                         entityId = -1; | ||||
|                     } | ||||
|                 } | ||||
|                 if (entityId == -1) | ||||
|                 { | ||||
|                     if (ctx.Request.Headers.ContainsKey("auth" + requirement.EntityName.ToLower() + "id")) | ||||
|                     { | ||||
|                         if (!int.TryParse(ctx.Request.Headers["auth" + requirement.EntityName.ToLower() + "id"], out entityId)) | ||||
|                         { | ||||
|                             entityId = -1; | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 // legacy support | ||||
|                 if (entityId == -1) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker