2024-02-07 01:27:20 +00:00
|
|
|
from dataclasses import dataclass
|
2023-08-29 16:32:34 +00:00
|
|
|
from typing import Optional
|
2022-11-03 05:10:07 +00:00
|
|
|
|
2023-08-29 16:32:34 +00:00
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class Permission:
|
|
|
|
name: str
|
|
|
|
abbr: Optional[str]
|
|
|
|
description: Optional[str]
|
|
|
|
takes_database: bool
|
|
|
|
takes_resource: bool
|
|
|
|
default: bool
|
|
|
|
# This is deliberately undocumented: it's considered an internal
|
|
|
|
# implementation detail for view-table/view-database and should
|
|
|
|
# not be used by plugins as it may change in the future.
|
|
|
|
implies_can_view: bool = False
|