directus-extension-inline-form-interface icon indicating copy to clipboard operation
directus-extension-inline-form-interface copied to clipboard

Rework usePermissions for compatibility with Directus 11

Open JoshTheDerf opened this issue 1 year ago • 4 comments
trafficstars

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.

JoshTheDerf avatar Aug 09 '24 17:08 JoshTheDerf

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 🤔

hanneskuettner avatar Aug 09 '24 18:08 hanneskuettner

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?

JoshTheDerf avatar Aug 09 '24 21:08 JoshTheDerf

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 :)

davidpp avatar Oct 16 '24 16:10 davidpp

Hi! Any updates on this? I am not sure if I should use the extension or look for alternatives (are there any?)

marcinkoziej avatar Nov 08 '24 11:11 marcinkoziej

Hi! Are there any updates on this? Thanks!

DonCastillo avatar Sep 16 '25 15:09 DonCastillo

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

xluckydegen avatar Oct 22 '25 08:10 xluckydegen