-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create user roles #105
Comments
@JuusoV, check out the following learning resources demonstrating the alanning:roles package: |
The alanning:roles API documentation indicates there is a createRole method. We may be able to create the roles on |
It could also be possible to verify the roles before creating them, to avoid creating duplicates, by using the Roles.getAllRoles() method and checking each returned role for a duplicate. We have a similar pattern for avoiding duplicates in the ApiBackends collection. |
Also, refer to the Best Practices section of the roles demonstration video, where Adrian Lanning explains conventions for creating roles. This may influence how we implement roles in our project. |
Roles.createRole('role-name') works under Meteor.startup(). The created roles shown in the console with Roles.getAllRoles().find().fetch() |
@JuusoV please review the similar pattern for avoiding duplicates in the ApiUmbrellaAdmins collection. You will have to take the general pattern and modify it to work with your task. |
I got the roles working but I think we should not impelement them in the startup because the roles are only created once. Do you agree? |
Where should we implement them? On 18 June 2015 17:02:00 EEST, Juuso Vallius notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
@JuusoV consider the Add Roles Collection to Admin Dashboard. This is a simple and flexible recipe to add a 'Roles' button to the admin dashboard, where we can easily manage the Meteor.roles collection. It will satisfy the final step in this task. |
Thanks for the help and support @brylie. |
Create user roles for API user, API administrator and system administrator and document their privileges
Definition of done
The text was updated successfully, but these errors were encountered: