def _has_perm(self, user, permission):

        if user.is_superuser:
            return True
        if user.is_active:
            perms = [perm.split('.')[1] for perm in user.get_all_permissions()]
            return permission in perms
        return False
Check whether the user has the given permission
dataset/ETHPy150Open wuher/devil/devil/perm/acl.py/PermissionController._has_perm