Skip to content

Commit

Permalink
hookspec for datasette_acl_actor_ids, refs #18
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 1, 2024
1 parent 13f8feb commit d1e7348
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datasette_acl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from datasette import hookimpl, Permission
from datasette.events import CreateTableEvent
from datasette.utils import actor_matches_allow
from datasette.plugins import pm
from datasette_acl.utils import can_edit_permissions
from datasette_acl.views.table_acls import manage_table_acls
from datasette_acl.views.groups import manage_groups, manage_group
from . import hookspecs
import json
import sys
import time

pm.add_hookspecs(hookspecs)

CREATE_TABLES_SQL = """
create table if not exists acl_resources (
Expand Down
10 changes: 10 additions & 0 deletions datasette_acl/hookspecs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from pluggy import HookspecMarker

hookspec = HookspecMarker("datasette")


@hookspec
def datasette_acl_actor_ids(datasette):
"""
List of actor IDs that can be autocompleted against when editing permissions
"""

0 comments on commit d1e7348

Please sign in to comment.