def user_permissions(self, user, obj, perm):
        """
                try:
                    return self.get(user=user, permission = perm, object=obj.id)
                except ACLPermission.DoesNotExist:
                    return False
        """
        user_id = 0 if user.is_anonymous() else user.id
        acl_users_permissions = cache.get(ACL_USERS_PERMISSIONS_CACHE)
        if acl_users_permissions is None:
            acl_users_permissions = self.cache_user_permissions(user)
        else:
            try:
                acl_users_permissions[user_id]
            except __HOLE__:
                acl_users_permissions = self.cache_user_permissions(user)

        try:
            ct = ContentType.objects.get_for_model(obj)
            return acl_users_permissions[user_id][ct.pk][obj.id][perm.codename]
        except:
            return False
dataset/ETHPy150Open zorna/zorna/zorna/acl/models.py/ACLPermissionManager.user_permissions