MySQLPermissionRepositoryImpl
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait PermissionRepositoryclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Add a relation tuple to the database.
Add a relation tuple to the database.
This operation should be idempotent - adding the same relation twice should succeed without error (either by using INSERT IGNORE or catching unique constraint violations).
Value parameters
- relation
-
The relationship type
- target
-
The permission target
- userId
-
The user ID
Attributes
- Returns
-
Task[Unit]
- Definition Classes
-
PermissionRepository
Get all relation tuples for a user in a specific namespace.
Get all relation tuples for a user in a specific namespace.
This is the primary query for permission checking - fetches all relations the user has within a namespace, which are then evaluated by PermissionLogic.
Value parameters
- namespace
-
The resource namespace to filter by
- userId
-
The user ID
Attributes
- Returns
-
Task[Set[RelationTuple]] - Set of all relation tuples for the user in namespace
- Definition Classes
-
PermissionRepository
Check if a specific relation exists between user and target.
Check if a specific relation exists between user and target.
Value parameters
- relation
-
The relationship type (e.g., "owner", "editor", "viewer")
- target
-
The permission target
- userId
-
The user ID to check
Attributes
- Returns
-
Task[Boolean] - true if relation exists, false otherwise
- Definition Classes
-
PermissionRepository
Remove a relation tuple from the database.
Remove a relation tuple from the database.
This operation should be idempotent - removing a non-existent relation should succeed.
Value parameters
- relation
-
The relationship type
- target
-
The permission target
- userId
-
The user ID
Attributes
- Returns
-
Task[Unit]
- Definition Classes
-
PermissionRepository
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product