PermissionNames constants

Replace magic strings in authorisation calls
This commit is contained in:
Pavel Vesely
2020-03-14 09:21:26 +01:00
parent 52e31c42f6
commit 3e1c371be6
21 changed files with 79 additions and 49 deletions

View File

@ -99,7 +99,7 @@ namespace Oqtane.Controllers
{
permissions = UserSecurity.SetPermissionStrings(new List<PermissionString> { new PermissionString { PermissionName = "Edit", Permissions = Constants.AdminRole } });
}
if (_userPermissions.IsAuthorized(User, "Edit", permissions))
if (_userPermissions.IsAuthorized(User,PermissionNames.Edit, permissions))
{
if (string.IsNullOrEmpty(Folder.Path) && Folder.ParentId != null)
{