0
votes

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.

1

1 Answers

1
votes

You can use route activate guards for this. See this