websauna.system.auth.principals module

Resolve principals (groups and pseudo roles) for ACL.

websauna.system.auth.principals.resolve_principals(session_token, request)[source]

Get applied groups and other for the user.

This is a callback for pyramid.authentication.SessionAuthenticationPolicy.

  • List all groups as group:admin style strings

  • List super user as superuser:superuser style string

Return type

Optional[List[str]]

Returns

None if the user is not logged in, otherwise list of principals assigned to the user site wide.