-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): add onUnauthorized
callback to <CanAccess />
component
#4906
feat(core): add onUnauthorized
callback to <CanAccess />
component
#4906
Conversation
🦋 Changeset detectedLatest commit: 4bc3073 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for refine-doc-live-previews ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for stupendous-taffy-33f80c ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 4bc3073. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
60a5432
to
c79065f
Compare
✅ Deploy Preview for aquamarine-panda-e208bf ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for imaginative-sundae-1fd394 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for zippy-semolina-4ad81e ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for lighthearted-pastelito-e86ad1 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼
Added a minor comment.
|
||
import { useCan, useResource } from "@hooks"; | ||
import { BaseKey, IResourceItem, ITreeMenu } from "../../interfaces"; | ||
|
||
type Params = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this name is too generic. Optionally, we can rename it to something more specific, so it will be easier to read.
Co-authored-by: Salih Özdemir <[email protected]>
refinedev#4906) * feat(core): add onUnauthorized callback to CanAccess component * chore(core): changeset * chore(core): refactor inline types to type * chore(core): use only can state on effect dependencies * test(core): test callback only trigger once * chore(core): change type name * chore: typo fix Co-authored-by: Salih Özdemir <[email protected]> --------- Co-authored-by: Batuhan Wilhelm <[email protected]> Co-authored-by: Omer Aplak <[email protected]> Co-authored-by: Salih Özdemir <[email protected]>
feat: added
onUnauthorized
callback to<CanAccess />
component. This callback to be called whenuseCan
returns false.Test plan (required)
Self Check before Merge
Please check all items below before review.