From a1f90fe549f81574bf07c65c45a0dad6abc2bb10 Mon Sep 17 00:00:00 2001 From: Chen Liu Date: Sat, 2 Apr 2022 17:23:14 +0800 Subject: [PATCH] Fix issues in rbac.md 1. `role` => `roles`. `role` was replaced by `roles` in https://github.com/redwoodjs/redwood/pull/4681 2. updated user role example. --- docs/docs/tutorial/chapter7/rbac.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/tutorial/chapter7/rbac.md b/docs/docs/tutorial/chapter7/rbac.md index c456f6c18ad0..76c3c657621f 100644 --- a/docs/docs/tutorial/chapter7/rbac.md +++ b/docs/docs/tutorial/chapter7/rbac.md @@ -79,11 +79,11 @@ export const getCurrentUser = async (session) => { ### Restricting Access via Routes -The easiest way to prevent access to an entire URL is via the Router. The `` component takes a prop `role` in which you can give a list of only those role(s) that should have access: +The easiest way to prevent access to an entire URL is via the Router. The `` component takes a prop `roles` in which you can give a list of only those role(s) that should have access: ```jsx title="web/src/Routes.js" // highlight-next-line - + @@ -108,7 +108,7 @@ yarn rw c Now we can update our user with a single command: ```bash -> db.user.update({ where: { id: 1 } }, data: { roles: 'admin' } }) +> db.user.update({ where: { id: 1 } , data: { roles: 'admin' } }) ``` Which should return the new content of the user: