Make trying to undo an inactive user or group not an exception.
@@ -2077,9 +2077,13 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_group.gaccess.active:
- raise PermissionDenied("Group is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("Group is not active")
+ return False
if not this_user.is_active:
- raise PermissionDenied("User is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("User is not active")
+ return False
return self.__get_group_undo_users(this_group).filter(id=this_user.id).exists()
@@ -2182,7 +2186,9 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_user.is_active:
- raise PermissionDenied("User is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("User is not active")
+ return False
return self.__get_resource_undo_users(this_resource).filter(id=this_user.id).exists()
@@ -2274,7 +2280,9 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_group.gaccess.active:
- raise PermissionDenied("Group is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("Group is not active")
+ return False
return self.__get_resource_undo_groups(this_resource).filter(id=this_group.id).exists()
@@ -3262,7 +3270,9 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_user.is_active:
- raise PermissionDenied("Grantee user is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("Grantee user is not active")
+ return False
return self.__get_community_undo_users(this_community).filter(id=this_user.id).exists()
@@ -3355,7 +3365,9 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_group.gaccess.active:
- raise PermissionDenied("Group is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("Group is not active")
+ return False
return self.__get_community_undo_groups(this_community).filter(id=this_group.id).exists()
@@ -3390,7 +3402,9 @@ class UserAccess(models.Model):
if not self.user.is_active:
raise PermissionDenied("Requesting user is not active")
if not this_group.gaccess.active:
- raise PermissionDenied("Group is not active")
+ # This causes problems with display of resources
+ # raise PermissionDenied("Group is not active")
+ return False
qual_undo = self.__get_community_undo_groups(this_community)
if qual_undo.filter(id=this_group.id).exists():
