feriennet.policy

Attributes

T

Classes

ActivityQueryPolicy

Limits activity queries depending on the current user.

Module Contents

feriennet.policy.T[source]
class feriennet.policy.ActivityQueryPolicy(username: str | None, role: str | None)[source]

Limits activity queries depending on the current user.

username[source]
role[source]
classmethod for_identity(identity: Identity | NoIdentity | None) Self[source]
granted_subset(query: Query[T]) Query[T][source]

Limits the given activites query for the given user.

public_subset(query: Query[T]) Query[T][source]

Limits the given query to activites meant for the public.

private_subset(query: Query[T]) Query[T][source]

Limits the given query to activites meant for admins/owners.

Admins see all the states and owners see the states of their own.