简体   繁体   中英

Dynamic Roles and permissions based authorisation on angular 4 application

I am creating an application with angular 4, Where my super-admin will create different roles and give access to different features(permissions) so both things will be dynamic.

Now I want to only display features that users have permissions based on the role he assigned and another thing is I also want to guard the route so a user will not access the feature with manually typing the URL.

I have checked ngx-permissions with that I can do this both things but I need to have the default name for role(that I don't have in my application) and need to know which user has what permissions(that is also I will not have)

Is there any way to do role-based authorization with dynamic role name and dynamic feature permissions?

Any help would be appreciated.

You can use route activate guards for this. See this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM