Server naming fixes and cleanup
Server is now completely cleaned up and without warnings
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Oqtane.Infrastructure;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Oqtane.Shared;
|
||||
|
||||
namespace Oqtane.Security
|
||||
@ -25,14 +25,14 @@ namespace Oqtane.Security
|
||||
var ctx = _httpContextAccessor.HttpContext;
|
||||
if (ctx != null && ctx.Request.Query.ContainsKey("entityid"))
|
||||
{
|
||||
int EntityId = int.Parse(ctx.Request.Query["entityid"]);
|
||||
if (_userPermissions.IsAuthorized(context.User, requirement.EntityName, EntityId, requirement.PermissionName))
|
||||
int entityId = int.Parse(ctx.Request.Query["entityid"]);
|
||||
if (_userPermissions.IsAuthorized(context.User, requirement.EntityName, entityId, requirement.PermissionName))
|
||||
{
|
||||
context.Succeed(requirement);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Log(LogLevel.Error, this, LogFunction.Security, "User {User} Does Not Have {PermissionName} Permission For {EntityName}:{EntityId}", context.User, requirement.PermissionName, requirement.EntityName, EntityId);
|
||||
_logger.Log(LogLevel.Error, this, LogFunction.Security, "User {User} Does Not Have {PermissionName} Permission For {EntityName}:{EntityId}", context.User, requirement.PermissionName, requirement.EntityName, entityId);
|
||||
}
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
|
Reference in New Issue
Block a user