new controller auth parameter should take precedence over legacy
This commit is contained in:
@ -31,9 +31,13 @@ namespace Oqtane.Security
|
||||
{
|
||||
entityId = int.Parse(ctx.Request.Query["auth" + requirement.EntityName.ToLower() + "id"]);
|
||||
}
|
||||
if (ctx.Request.Query.ContainsKey("entityid"))
|
||||
else
|
||||
{
|
||||
entityId = int.Parse(ctx.Request.Query["entityid"]);
|
||||
// legacy support
|
||||
if (ctx.Request.Query.ContainsKey("entityid"))
|
||||
{
|
||||
entityId = int.Parse(ctx.Request.Query["entityid"]);
|
||||
}
|
||||
}
|
||||
if (_userPermissions.IsAuthorized(context.User, requirement.EntityName, entityId, requirement.PermissionName))
|
||||
{
|
||||
|
Reference in New Issue
Block a user