auth — PyCI Authentication and Authorization Module

all_of(*conditions)
Returns True if all of the conditions match
any_of(*conditions)
Returns True if any of the conditions match
check_auth(*args, **kwargs)
A tool that looks in config for ‘auth.require’. If found and it is not None, a login is required and the entry is evaluated as a list of conditions that the user must fulfill
check_credentials(user, password)
Checks a given user and password against /etc/shadow (or /etc/passwd if /etc/shadow doesn’t exist). Returns None on success and an error message on failure.
check_group_membership(username, group)
Checks whether or not user is a member of ‘group’ (using /etc/passwd and /etc/group) Returns True if the user is in the group. False if not.
check_permission(user, permission, plugin)
Returns true if the given user has the given permission to the given plugin
get_group_memeberships(user)
Returns a list of groups the user belongs to (including their primary group)
has_read(plugin)
Decorator that returns True if the user has been granted read permissions to the given plugin
has_write(plugin)
Decorator that returns True if the user has been granted write permissions to the given plugin
require(*conditions)
A decorator that appends conditions to the auth.require config variable.

Previous topic

PyCI — Python Configuration Interface

Next topic

brctl — PyCI Bridge Module

This Page

Quick search