mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
* Docs for permissions: in metadata, refs #1636 * Refactor default_permissions.py to help with implementation of #1636 * register_permissions() plugin hook, closes #1939 - also refs #1938 * Tests for register_permissions() hook, refs #1939 * Documentation for datasette.permissions, refs #1939 * permission_allowed() falls back on Permission.default, refs #1939 * Raise StartupError on duplicate permissions * Allow dupe permisisons if exact matches
6 lines
161 B
Python
6 lines
161 B
Python
import collections
|
|
|
|
Permission = collections.namedtuple(
|
|
"Permission",
|
|
("name", "abbr", "description", "takes_database", "takes_resource", "default"),
|
|
)
|