-
-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Labels
Milestone
Description
Spotted this while working on:
datasette/datasette/utils/__init__.py
Lines 1005 to 1021 in e627510
| async def check_visibility(datasette, actor, action, resource, default=True): | |
| """Returns (visible, private) - visible = can you see it, private = can others see it too""" | |
| visible = await datasette.permission_allowed( | |
| actor, | |
| action, | |
| resource=resource, | |
| default=default, | |
| ) | |
| if not visible: | |
| return False, False | |
| private = not await datasette.permission_allowed( | |
| None, | |
| action, | |
| resource=resource, | |
| default=default, | |
| ) | |
| return visible, private |
Reactions are currently unavailable