Skip to content

Commit

Permalink
fixed typo of roll to role (#5484)
Browse files Browse the repository at this point in the history
Co-authored-by: Paine Leffler <[email protected]>
Co-authored-by: Dominic Saadi <[email protected]>
  • Loading branch information
3 people committed May 10, 2022
1 parent 3931ce8 commit 91bfc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/tutorial/chapter7/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ Having a role like "admin" implies that they can do everything...shouldn't they
1. Add "admin" to the list of roles in the `hasRole()` checks in components, `@requireAuth` directive, and `requireAuth()` check in services
2. Don't make any changes in the code, just give the user in the database additional roles—so admins will also have the "moderator" role in addition to "admin"
By virtue of the name "admin" it really feels like someone should only have that one single roll and be able to do everything. So in this case it might feel better to add "admin" to `hasRole()` and `requireAuth()`.
By virtue of the name "admin" it really feels like someone should only have that one single role and be able to do everything. So in this case it might feel better to add "admin" to `hasRole()` and `requireAuth()`.
But, if you wanted to be more fine-grained with your roles then maybe the "admin" role should really be called "author". That way it makes it clear they only author posts, and if you want someone to be able to do both actions you can explicitly give them the "moderator" role in addition to "author."
Expand Down

0 comments on commit 91bfc33

Please sign in to comment.