I'm new to angular and am now developing a role management dashboard where a super-admin can assign and manage roles(possible roles: 'school admin', 'Teacher', 'Student', 'Parent') and their permissions respectively by clicking the check boxes.
NOTE: Refer the image for role management dashboard.
I found this link "https://jasonwatmore.com/post/2018/11/22/angular-7-role-based-authorization-tutorial-with-example" to be helpful when I tested to assign the permissions to the roles statically.
I also went through this question "Angular 6 Role based Authentication", but again the answer for this only helps with static role assignment.
so when a user clicks on the check box, the user should be assigned access to that particular component. I'm wondering is there a way where am user can manage roles and their permissions dynamically from an UI like Angular?If yes, how do we do it? Or any links that relates this would be of great help !!
Related
i want to provide role based route access e.g there is two types of user 1.Admin and 2.normal user.
if normal user try to access admin pages through url then user will redirects to dashboard page and same case for admin.
This is quite a lot of code you're asking for.
One thing you need to look into is Route Guards which let you protect access to routes based on your own written criteria:
https://angular.io/guide/router#milestone-5-route-guards
You also need to pick a way to manage your roles and users. A popular way for Ionic is to use Firebase:
https://firebase.google.com/
A great tutorial for setting this all up is over at AngularFirebase.com (currently rebranding to Fireship.io).
It's a long tutorial, and you will need to follow an additional tutorial for setting up the login system as well, but it will get you to where you want to be.
Role Based Authorization With Firestore and Angular
In a nutshell:
Restrict component's EDITION via configuration.
In details:
I have some roles defined in the Magnolia's Security app. I would like to restrict access (allowing to edit a component) to a dialog to a given role.
i.e. I have a custom form component with sensitive configuration in the its dialog (content of emails sent & so on) and I need to restrict the access to the relevant tabs or fields to superuser
Info I found
I looked into the Dialog Definition documentation of Magnolia CMS and found nothing on this topic.
What I tried
I tried following a similar pattern as the one used for Magnolia CMS' Template availability by role, using a roles node with a relevant child property (i.e. superuser property with value superuser).
But no luck, whether I add this node on the <formName>, form, tabs, <tabName> or fields level.
While provisioning role to the user from the User details page it is giving Issue as Role Assignment showing Type as Manage User instead of Role and description also not coming.
But it works well when assigned the same role via Roles details page
I have created a new user, with a new role and I want to configure the user front page.
I added a document that the admin created, but when I login as my new user, I see a blanc page, I can't see the page content :(
What have I missed, is there another privileges that I need to set to my user to be able to see the document created by the admin?
Thanks in advance for your help!
you have to enter as admin and then:
1. enter the details of the user's role and enable required functionalities (documents browser, my data, my analysis, ...);
2. enter Menu configuration and define menu items for user's role.
As an alternative, you can develop an external web application using REST API.
Best regards
Davide
We are creating a back end admin system and want to allow users in roles such as finance and membership to have access to certain areas. Ideally we would like to show only areas that you have access to in the navigation.
Using umbraco 4.7+ and razor. We are using the Microsoft role provider.
I was wondering if anyone knows how I could access the currently logged in users role?
DynamicNode has two methods that will be your friends here, HasAccess() and IsProtected(). Here's an example of how to filter and show nodes that the user only has access to. Here's another one.
Using those methods you shouldn't need to have to get the roles of the currently logged in user, but that's not hard to do as well. Roles.GetRolesForUser() returns an array of the currently logged in user's roles. For more information, refer to the documentation.