Skip to content

Commit a8918d8

Browse files
authored
Merge pull request #8127 from marmelab/fix-rbac-links
Doc: Fix rbac links
2 parents 0ff9adc + 76273d9 commit a8918d8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/canAccess.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "The canAccess helper"
55

66
# `canAccess`
77

8-
This helper function, part of [the ra-rbac module](https://marmelab.com/ra-rbac)<img class="icon" src="./img/premium.svg" />, can check if the current permissions allow the user to execute an action on a resource (and optionally a record). It requires the `permissions` array, so it must be used in conjunction with `usePermissions`.
8+
This helper function, part of [the ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac)<img class="icon" src="./img/premium.svg" />, can check if the current permissions allow the user to execute an action on a resource (and optionally a record). It requires the `permissions` array, so it must be used in conjunction with `usePermissions`.
99

1010
`canAccess` expects an object `{ permissions, resource, action, record }` as parameter, and returns a boolean.
1111

docs/useCanAccess.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "useCanAccess"
55

66
# `useCanAccess`
77

8-
This hook, part of [the ra-rbac module](https://marmelab.com/ra-rbac)<img class="icon" src="./img/premium.svg" />, calls the `authProvider.getPermissions()` to get the role definitions, then checks whether the requested action and resource are allowed for the current user.
8+
This hook, part of [the ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac)<img class="icon" src="./img/premium.svg" />, calls the `authProvider.getPermissions()` to get the role definitions, then checks whether the requested action and resource are allowed for the current user.
99

1010
`useCanAccess` takes an object `{ action, resource, record }` as argument. It returns an object describing the state of the RBAC request. As calls to the `authProvider` are asynchronous, the hook returns a `loading` state in addition to the `canAccess` key.
1111

docs/usePermissions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const MyPage = () => {
6363

6464
## RBAC
6565

66-
[The ra-rbac module](https://marmelab.com/ra-rbac)<img class="icon" src="./img/premium.svg" /> provides an alternative implementation of the `usePermissions` hook. It returns an array of permissions, resulting in the merge of the user permissions and the permissions from the user roles.
66+
[The ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac)<img class="icon" src="./img/premium.svg" /> provides an alternative implementation of the `usePermissions` hook. It returns an array of permissions, resulting in the merge of the user permissions and the permissions from the user roles.
6767

6868
```jsx
6969
import { usePermissions } from "@react-admin/ra-rbac";

0 commit comments

Comments
 (0)