mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Rename permission created by demo plugin
It was showing up as 'new-permission' on https://latest.datasette.io/-/permissions which I thought was confusing
This commit is contained in:
parent
34ad574bac
commit
45979eb723
2 changed files with 5 additions and 5 deletions
|
|
@ -413,9 +413,9 @@ def register_permissions(datasette):
|
||||||
extras = datasette.plugin_config("datasette-register-permissions") or {}
|
extras = datasette.plugin_config("datasette-register-permissions") or {}
|
||||||
permissions = [
|
permissions = [
|
||||||
Permission(
|
Permission(
|
||||||
name="new-permission",
|
name="permission-from-plugin",
|
||||||
abbr="np",
|
abbr="np",
|
||||||
description="New permission",
|
description="New permission added by a plugin",
|
||||||
takes_database=True,
|
takes_database=True,
|
||||||
takes_resource=False,
|
takes_resource=False,
|
||||||
default=False,
|
default=False,
|
||||||
|
|
|
||||||
|
|
@ -1069,10 +1069,10 @@ async def test_hook_register_permissions(extra_metadata):
|
||||||
plugins_dir=PLUGINS_DIR,
|
plugins_dir=PLUGINS_DIR,
|
||||||
)
|
)
|
||||||
await ds.invoke_startup()
|
await ds.invoke_startup()
|
||||||
assert ds.permissions["new-permission"] == Permission(
|
assert ds.permissions["permission-from-plugin"] == Permission(
|
||||||
name="new-permission",
|
name="permission-from-plugin",
|
||||||
abbr="np",
|
abbr="np",
|
||||||
description="New permission",
|
description="New permission added by a plugin",
|
||||||
takes_database=True,
|
takes_database=True,
|
||||||
takes_resource=False,
|
takes_resource=False,
|
||||||
default=False,
|
default=False,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue