Add conditional so workspace invitation is only revokable if the user is active
This commit is contained in:
@@ -146,7 +146,10 @@ class Workspaces(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def can_revoke_access_for(cls, workspace, workspace_role):
|
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
|
@classmethod
|
||||||
def revoke_access(cls, user, workspace_id, workspace_role_id):
|
def revoke_access(cls, user, workspace_id, workspace_role_id):
|
||||||
|
Reference in New Issue
Block a user