-
Notifications
You must be signed in to change notification settings - Fork 116
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: permissions check for cross space reference editor [FUS-115] #1818
Conversation
@@ -17,10 +18,18 @@ export function SingleResourceReferenceEditor( | |||
} | |||
) { | |||
const { dialogs, field } = props.sdk; | |||
|
|||
const editorPermissions = useEditorPermissions({ |
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.
we could move useEditorPermissions
inside of useResourceLinkActions
as it's the same for single nad multiple resources :)
- NIT: instead of passing all props down, just provide the necessary ones :)
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.
@chrishelgert I wasn't sure where else this is used, changed it 👍
d0855f8
to
8cb3708
Compare
I completely removed the |
8cb3708
to
7c95720
Compare
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.
🥇
BTW do you plan to have the checks in RichText editor too? |
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 🚀
Description
Checks permission when rendering to the Reference Editor. This check exists on the service, but we also want to check for access in the frontend for better UX. The same logic exists for "normal" same space entries.