utils.py

About this file

It defines two functions.
One for, given a permissions mask, check if the specified permission value is within those permissions.
Another one, given a permissions mask, return a list of app.constants.permission.PermissionPair.

Code Check Report


No problems to report
                        

Documentation drawn from source code


in_permissions(permissions, value):

Given a permissions mask, check if the specified permission value is within those permissions.

:param permissions: permissions set as integer mask
:param value: permission value to look for

:type permissions: int
:type value: int

:return: is value in permissions?

get_permissions_as_list(permissions):

Given a permissions mask, return a list of app.constants.permission.PermissionPair

Source code