Skip to content

Commit 2d82229

Browse files
committed
add a paragraph to explain permission with Tab name prop
1 parent 22eee07 commit 2d82229

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/AuthRBAC.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,9 @@ 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.
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' }`.
636638
637639
`<Tab>` also only renders the child fields for which the user has the 'read' permissions.
638640

0 commit comments

Comments
 (0)