-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
I was trying to implement roles and permissions in my project
these are my Permissions
public enum AquaPermissions : ushort
{
.....
[Display(GroupName = "MasterAdmin", Name = "Read masters", Description = "Can list masters")]
ReadMaster = 3_000,
[Display(GroupName = "MasterAdmin", Name = "Edit masters", Description = "Can edit masters")]
EditMaster = 3_001,
....
}
and these are my RolesDefinition
public static readonly List<BulkLoadRolesDto> RolesDefinition = new List<BulkLoadRolesDto>()
{
new("SuperAdmin", "Super admin - only use for setup", "AccessAll"),
new("MasterAdmin","Master Admin - Have access to edit master","EditMaster, ReadMaster")
}
but the permissions are stored in what look like encrypted format (my locale is (IN , eng))
and when I get my token from the user after login , I am getting Permissions claim also in encrypted format.
when I decorate my endpoint with permissions {AquaPermissions.ReadMaster} it is not working
I have to hardcode it as the encrypted format ("ஹஸ" ) for it to work
is it how it is supposed to work ?
Metadata
Metadata
Assignees
Labels
No labels

