ctl.auth
Classes
expose
expose(builtins.object)
Decorator to expose a ctl plugin's method - permissions will be checked before method is executed
Methods
__call__
def __call__(self, fn)
Call self as a function.
__init__
def __init__(self, namespace, level=None, explicit=False)
Keyword Arguments
- namespace (
str): permissioning namespace, has the following formatting variables available:plugin: the plugin instanceplugin_name: name of the plugin instance as defined in config- any arguments passed to the method by argument name
- level (
function|str|None): permission level to check.- If a function is passed it is expected to return a permission level string. The function will be passed the plugin instance as an argument.
- If a string is passed it is expected to be a permission level string
- If None is passed, permission level will be obtained from the plugin's
config and default to
r
- explicit (
bool=False): If true will enable explicit namespace checking