octoprint.access.permissions#
OctoPrintPermission(name, description, *needs, **kwargs)
#
Bases: Permission
allows(identity)
#
Whether the identity can access this permission. Overridden from Permission.allows to make sure the Identity provides ALL required needs instead of ANY required need.
Parameters:
-
identity
(
octoprint.vendor.flask_principal.Identity
) –The identity to check
difference(other)
#
Create a new OctoPrintPermission consisting of requirements in this permission and not in the other.
union(other)
#
Create a new OctoPrintPermission with the requirements of the union of this and other.
Parameters:
-
other
(
OctoPrintPermission
) –The other permission
PluginIdentityContext(key, http_exception = None)
#
Identity context for not initialized Permissions
Needed to support @Permissions.PLUGIN_X_Y.require()
Will search the permission when needed
PluginPermissionDecorator(key)
#
Bases: Permission
Decorator Class for not initialized Permissions
Needed to support @Permissions.PLUGIN_X_Y.require()