Closed simonw closed 8 months ago
Decision: for the next 0.8 release of this plugin I will do the following:
edit-schema
permission in place - it will be a shortcut for allowing all permissionsedit-schema-create-table
and edit-schema-drop-table
permissions, instead looking for create-table
and drop-table
from corealter-table
permission. That's going to come from Datasette core but is blocked until 1.0a9 is out.It's actually really hard to support just drop-table
without alter-table
because the plugin is currently designed to bundle all the features together on the one page, with no way of allowing access to the "edit schema" page if all you should see on that page is the drop table button.
As such I'm going to require edit-schema
in order to use the drop feature.
... but that doesn't make much sense, because the whole point of the finely grained permissions project was to help administrators set it so that users could alter a table but not actually drop it.
Maybe I should block this work on a Datasette 1.0a9 release. https://github.com/simonw/datasette/milestone/31
But... if this plugin depends on those permissions in core, what about Datasette 0.x?
I think that continues to use the existing permission. The documentation will need to explain this.
I'm going to ship Datasette1.0a9
and then release 0.8 of this plugin using those core permissions.
1.0a9 is out now: https://docs.datasette.io/en/latest/changelog.html#a9-2024-02-16
I'll continue to support edit-schema
as a parent permission for everything else, mainly to avoid breaking existing deployments.
In #22 I added
edit-schema-create-table
andedit-schema-drop-table
permissions, forgetting that these already existed in Datasette core:Originally posted by @simonw in https://github.com/simonw/datasette-edit-schema/issues/22#issuecomment-1935167139
edit-schema-alter-table
is harder, because Datasette only just got that permission today and it's not available in a release yet (it's not in1.0a8
).