Skip to content

Commit 1a7809c

Browse files
committed
bug fixes
1 parent 0eb81dc commit 1a7809c

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/Infrastructure/Services/Identity/RoleService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public async Task<Result<string>> UpdatePermissionsAsync(PermissionRequest reque
183183
if (role.Name == RoleConstants.AdministratorRole)
184184
{
185185
var currentUser = await _userManager.Users.SingleAsync(x => x.Id == _currentUserService.UserId);
186-
if (!await _userManager.IsInRoleAsync(currentUser, RoleConstants.AdministratorRole))
186+
if (await _userManager.IsInRoleAsync(currentUser, RoleConstants.AdministratorRole))
187187
{
188188
return await Result<string>.FailAsync(_localizer["Not allowed to modify Permissions for this Role."]);
189189
}

src/Shared/Constants/Permission/Permissions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ namespace BlazorHero.CleanArchitecture.Shared.Constants.Permission
66
{
77
public static class Permissions
88
{
9-
public static class Test
10-
{
11-
public const string View = "Permissions.Test.View";
12-
public const string Create = "Permissions.Test.Create";
13-
public const string Edit = "Permissions.Test.Edit";
14-
public const string Delete = "Permissions.Test.Delete";
15-
}
169
public static class Products
1710
{
1811
public const string View = "Permissions.Products.View";

0 commit comments

Comments
 (0)