def has_permission(self, package, perm):
        current_userid = self.request.userid
        if current_userid is not None and self.is_admin(current_userid):
            return True

        perms = self.allowed_permissions(package)
        for principal in effective_principals(self.request):
            if perm in perms.get(principal, []):
                return True
        return False
Test to reboot a domain via ACPI request
dataset/ETHPy150Open mathcamp/pypicloud/pypicloud/access/base.py/IAccessBackend.has_permission--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/xapi_test.py/XapiTestCase.test_reboot