mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
debug-menu permission, closes #1068
Also added tests for navigation menu logic.
This commit is contained in:
parent
9f0987cb57
commit
222f79bb4c
6 changed files with 58 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ from datasette.utils import actor_matches_allow
|
|||
@hookimpl(tryfirst=True)
|
||||
def permission_allowed(datasette, actor, action, resource):
|
||||
async def inner():
|
||||
if action == "permissions-debug":
|
||||
if action in ("permissions-debug", "debug-menu"):
|
||||
if actor and actor.get("id") == "root":
|
||||
return True
|
||||
elif action == "view-instance":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue