directus-extension-inline-form-interface
directus-extension-inline-form-interface copied to clipboard
Rework usePermissions for compatibility with Directus 11
The usePermissions composable was completely overhauled for Directus 11, causing this extension to crash with an unexpected error on Directus 11 when used by non-Admin users.
This PR does a preliminary job of porting over the usePermissions changes to directus-extension-inline-form-interface. It hasn't been fully tested in all situations, but it does resolve the original crash when rendering the interface.
Thank you so much! This is a bit funny, since I'm the one of the people who implemented permissions in v11 and completely forgot about this little extension...
The only problem I see is that it copied code verbatim from the Directus repository which is licensed under BSL and can't be easily relicensed for this repo I'm afraid. I will think of a solution for that. Maybe this is the push we need to make the composables available as part of the extensions SDK 🤔
Hmm, that is quite a problem. I know a lot of extension developers do that, just because the internals aren't exposed, but I'm not exactly sure how to go about avoiding that for this extension. (As use-permissions.ts before was a similar situation.)
Might be something worth clarifying with the core team?
Came across this PR while looking up the error after updating to Directus 11. Will fork your PR for now until the license issue is resolved. But wanted to leave a message to say thanks for both the extension from Hannes and for you taking time to fix the issue :)
Hi! Any updates on this? I am not sure if I should use the extension or look for alternatives (are there any?)
Hi! Are there any updates on this? Thanks!
Hi, is there any progress with this issue? It seems official implementation of this extension directly to Directus never happened, right? What is the best way how to fix it now? Do a fork and fix it by this? Thanks