stalker.ext.auth.permission_required — Stalker v0.1.1.a9 documentation

### Navigation

- index
- next |
- previous |
- Stalker v0.1.1.a9 documentation »

# 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

### Navigation

- index
- next |
- previous |
- Stalker v0.1.1.a9 documentation »