Class for prividing various permissions


allow extensions provide permissions to others

__dict__ = mappingproxy({'__weakref__': <attribute '__weakref__' of 'Permissions' objects>, '__doc__': ' Class for prividing various permissions\n\n .. todo:: allow extensions provide permissions to others\n ', '__dict__': <attribute '__dict__' of 'Permissions' objects>, '__module__': '', 'admin_role': <Permission needs={Need(method='role', value='admin')} excludes=set()>})
__module__ = ''

list of weak references to the object (if defined)

admin_role = <Permission needs={Need(method='role', value='admin')} excludes=set()>

Administrator role permission*args)

Simple helper for clearing variables from session

Parameters:args – names of session variables to remove

Init security extensions (login manager and principal)

Parameters:db (flask_sqlalchemy.SQLAlchemy) – Database which stores user accounts and roles
Returns:Login manager and principal extensions
Return type:(flask_login.LoginManager, flask_principal.Principal

Login desired user into the app

Parameters:user_account (repocribro.models.UserAccount) – User account to be logged in

Logout the current user from the app, identity)

Principal helper for loading the identity of logged user

  • sender – Sender of the signal
  • identity (flask_principal.Identity) – Identity container = < object>

All permissions in the app