From 76273d9c9fdde74ec0929389eef703a9d7ed695d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kaiser Date: Wed, 31 Aug 2022 18:17:14 +0200 Subject: [PATCH] Fix rbac links in docs --- docs/canAccess.md | 2 +- docs/useCanAccess.md | 2 +- docs/usePermissions.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/canAccess.md b/docs/canAccess.md index b783e2f82d2..d3541bae993 100644 --- a/docs/canAccess.md +++ b/docs/canAccess.md @@ -5,7 +5,7 @@ title: "The canAccess helper" # `canAccess` -This helper function, part of [the ra-rbac module](https://marmelab.com/ra-rbac), 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`. +This helper function, part of [the ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac), 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`. `canAccess` expects an object `{ permissions, resource, action, record }` as parameter, and returns a boolean. diff --git a/docs/useCanAccess.md b/docs/useCanAccess.md index 2757d9d1794..d435922d37f 100644 --- a/docs/useCanAccess.md +++ b/docs/useCanAccess.md @@ -5,7 +5,7 @@ title: "useCanAccess" # `useCanAccess` -This hook, part of [the ra-rbac module](https://marmelab.com/ra-rbac), calls the `authProvider.getPermissions()` to get the role definitions, then checks whether the requested action and resource are allowed for the current user. +This hook, part of [the ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac), calls the `authProvider.getPermissions()` to get the role definitions, then checks whether the requested action and resource are allowed for the current user. `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. diff --git a/docs/usePermissions.md b/docs/usePermissions.md index f54a3b49cd2..ed7feccd9a1 100644 --- a/docs/usePermissions.md +++ b/docs/usePermissions.md @@ -63,7 +63,7 @@ const MyPage = () => { ## RBAC -[The ra-rbac module](https://marmelab.com/ra-rbac) 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. +[The ra-rbac module](https://marmelab.com/ra-enterprise/modules/ra-rbac) 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. ```jsx import { usePermissions } from "@react-admin/ra-rbac";