0
jdavis01 created
So I have the latest 4.6.1 Aspnet Core JQuery template have run into a role user permission scenario that I need to get clarified.
I have configured the application with multi - Tenancy disabled and configured AppPermissions as follows:
// AppPermissions
public const string Pages_Tenant_Vendors = "Pages.Tenant.Vendors";
public const string Pages_Tenant_Vendor_Create = "Pages.Tenant.Vendor.Create";
public const string Pages_Tenant_Vendor_Edit = "Pages.Tenant.Vendor.Edit";
public const string Pages_Tenant_Vendor_Delete = "Pages.Tenant.Vendor.Delete";
// AppAuthorizationProvider
var vendor = pages.CreateChildPermission(AppPermissions.Pages_Tenant_Vendors, L("Vendors"),multiTenancySides:MultiTenancySides.Tenant);
vendor.CreateChildPermission(AppPermissions.Pages_Tenant_Vendor_Create, L("VendorCreate"), multiTenancySides: MultiTenancySides.Tenant);
vendor.CreateChildPermission(AppPermissions.Pages_Tenant_Vendor_Edit, L("VendorEdit"), multiTenancySides: MultiTenancySides.Tenant);
vendor.CreateChildPermission(AppPermissions.Pages_Tenant_Vendor_Delete, L("VendorDelete"), multiTenancySides: MultiTenancySides.Tenant);
When I assign permissions to a specific role the users in that role still need to have the permission assigned to them as well..
The expected behavior was that roles would hold the permissions and the users would be assigned permissions through roles.
Can you help to explain why I still need to assign users to permissions that are already assigned to their role?
1 Answer(s)
-
0
Users would be assigned permissions through roles, not directly. You can check:
var grantedPermissions = UserManager.GetGrantedPermissionsAsync(user);