kopia lustrzana https://github.com/simonw/datasette
Better comments in permission_allowed_default()
rodzic
97de4d6362
commit
47e29e948b
|
@ -144,7 +144,7 @@ def permission_allowed_default(datasette, actor, action, resource):
|
||||||
if actor and actor.get("id") == "root":
|
if actor and actor.get("id") == "root":
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Resolve metadata view permissions
|
# Resolve view permissions in allow blocks in configuration
|
||||||
if action in (
|
if action in (
|
||||||
"view-instance",
|
"view-instance",
|
||||||
"view-database",
|
"view-database",
|
||||||
|
@ -158,7 +158,7 @@ def permission_allowed_default(datasette, actor, action, resource):
|
||||||
if result is not None:
|
if result is not None:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Check custom permissions: blocks
|
# Resolve custom permissions: blocks in configuration
|
||||||
result = await _resolve_config_permissions_blocks(
|
result = await _resolve_config_permissions_blocks(
|
||||||
datasette, actor, action, resource
|
datasette, actor, action, resource
|
||||||
)
|
)
|
||||||
|
|
Ładowanie…
Reference in New Issue