mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Cascade for restricted token view-table/view-database/view-instance operations (#2154)
Closes #2102 * Permission is now a dataclass, not a namedtuple - refs https://github.com/simonw/datasette/pull/2154/#discussion_r1308087800 * datasette.get_permission() method
This commit is contained in:
parent
a1f3d75a52
commit
50da908213
8 changed files with 427 additions and 50 deletions
|
|
@ -122,7 +122,17 @@ class PermissionsDebugView(BaseView):
|
|||
# list() avoids error if check is performed during template render:
|
||||
{
|
||||
"permission_checks": list(reversed(self.ds._permission_checks)),
|
||||
"permissions": list(self.ds.permissions.values()),
|
||||
"permissions": [
|
||||
(
|
||||
p.name,
|
||||
p.abbr,
|
||||
p.description,
|
||||
p.takes_database,
|
||||
p.takes_resource,
|
||||
p.default,
|
||||
)
|
||||
for p in self.ds.permissions.values()
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue