Add conditional so workspace invitation is only revokable if the user is active
This commit is contained in:
parent
eb873d0fda
commit
93af6116c2
@ -146,7 +146,10 @@ class Workspaces(object):
|
||||
|
||||
@classmethod
|
||||
def can_revoke_access_for(cls, workspace, workspace_role):
|
||||
return workspace_role.user != workspace.owner
|
||||
return (
|
||||
workspace_role.user != workspace.owner
|
||||
and workspace_role.status == WorkspaceRoleStatus.ACTIVE
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def revoke_access(cls, user, workspace_id, workspace_role_id):
|
||||
|
Loading…
x
Reference in New Issue
Block a user