def has_perm(self, user, perm, obj=None):
        if not user.is_active:
            return False
        return perm in self.get_all_permissions(user, obj)
Build hooks env.
dataset/ETHPy150Open openstack/django_openstack_auth/openstack_auth/backend.py/KeystoneBackend.has_perm--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/instance_operation.py/LUInstanceReinstall.BuildHooksEnv