Skip to content

Commit 3f7a645

Browse files
committed
change sentence structure as suggested
1 parent 2d82229 commit 3f7a645

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

docs/AuthRBAC.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,11 @@ const ProductShow = () => (
632632

633633
Replacement for the `<TabbedShowLayout.Tab>` that only renders a tab if the user has the right permissions.
634634

635-
Add a `name` prop to the `<Tab>` to define the resource on which the user needs to have the 'read' permissions for.
636-
Then, to display a particular `<Tab>` update permissions definition as follows: `{ action: 'read', resource: '${resource}.tab.${source}' }`.
637-
> For instance, to allow user access `<Tab label="Description" name="description">` in product resource, add this line in permissions: `{ action: 'read', resource: 'products.tab.description' }`.
635+
Add a `name` prop to the `<Tab>` so you can reference it in the permissions.
636+
Then, to allow users to access a particular `<Tab>`, update the permissions definition as follows: `{ action: 'read', resource: '{RESOURCE}.tab.{NAME}' }`, where `RESOURCE` is the resource name, and `NAME` the name you provided to the `<Tab>`.
637+
638+
> For instance, to allow users access to the following tab `<Tab label="Description" name="description">` in `product` resource, add this line in permissions: `{ action: 'read', resource: 'products.tab.description' }`.
639+
638640

639641
`<Tab>` also only renders the child fields for which the user has the 'read' permissions.
640642

0 commit comments

Comments
 (0)