There is a javascript helper to check the permissions in javascript, however I want to extend this functionality with an extra parameter. I already have my own PermissionChecker and done an override of the IsGranted class in mvc razor views, this work fine, but can't figure out how the abp.auth.hasPermission exactly works and how to extend this.
2 Answer(s)
-
0
The principle of front-end checking permissions is: First get all the permissions of the application and the permissions granted by the current user from the server. Retrieve this information every time the page is refreshed (
/AbpScripts/GetScripts
)The permission check in abp.js is just a simple judgment.
https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Resources/Abp/Framework/scripts/abp.js#L127
-
0
Thank you for the quick response. It's totally clear now. However, this won't solve my problem as our application has 'project' specific roles and rights. Need to check if a teammember of a project has rights to specific functionalities. This seems not possible in this way. I think I have to solve this on the razor page