datasette / datasette-acl

Advanced permission management for Datasette
Apache License 2.0
1 stars 0 forks source link

Ability to manage global permissions #10

Open simonw opened 2 weeks ago

simonw commented 2 weeks ago

Permissions not associated with a resource, like the datasette-acl permission itself.

simonw commented 2 weeks ago

The UI for this is a bit of a challenge.

The grid I use for the table only really works there because there aren't many table permissions:

CleanShot 2024-08-31 at 21 28 39@2x

Once we get to global permissions there are a whole lot more - and plugins can register their own too.

I'm inclined to say each global permission should get its own dedicated page, but in that case a grid of checkboxes doesn't feel right.

simonw commented 2 weeks ago

Here's our permission_allowed plugin hook implementation at the moment - it only triggers for permission checks with a (database, resource) tuple:

https://github.com/datasette/datasette-acl/blob/01c0e94c9e00dda15c2ab2a88df074776263df93/datasette_acl/__init__.py#L285-L308