Compare commits

..

2 Commits

Author SHA1 Message Date
Leo Vasanko
d2a6bfd2a5 Add permissions to orgs and roles (in DB-agnostic API). 2025-08-12 13:21:37 -06:00
Leo Vasanko
6d9f2a967e Cleaner formatting 2025-08-12 13:21:05 -06:00
2 changed files with 13 additions and 9 deletions

View File

@ -19,7 +19,8 @@ from .util import passphrase, tokens
logger = logging.getLogger(__name__)
# Shared log message template for admin reset links
ADMIN_RESET_MESSAGE = """%s
ADMIN_RESET_MESSAGE = """\
%s
👤 Admin %s
- Use this link to register a Passkey for the admin user!

View File

@ -12,8 +12,8 @@ from uuid import UUID
@dataclass
class Org:
uuid: UUID
class Permission:
id: str # String primary key (max 128 chars)
display_name: str
@ -22,6 +22,15 @@ class Role:
uuid: UUID
org_uuid: UUID
display_name: str
permissions: list[Permission]
@dataclass
class Org:
uuid: UUID
display_name: str
permissions: list[Permission] # All that the Org can grant
roles: list[Role]
@dataclass
@ -56,12 +65,6 @@ class Session:
credential_uuid: UUID | None = None
@dataclass
class Permission:
id: str # String primary key (max 128 chars)
display_name: str
@dataclass
class SessionContext:
session: Session