Previous topic

stalker.ext.auth.logout

Next topic

stalker.ext.auth.set_password

This Page

stalker.ext.auth.permission_required

static auth.permission_required(permission_group, error_message=None)

a decorator that implements permission checking to any function or method

Checks if the logged in user is in the given permission group and then calls the decorated function

Parameters:
  • permission_group – a Group object showing the permision group
  • error_message – the message to be shown in case a LoginError is raised, a default message will be shown when skipped
Returns:

the decorated function