mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Allow setting of caseworking on a user
This commit changes the form that the user sees when inviting or editing another user, if the service has the ‘caseworking’ permission set. This will allow creating a new type of user, one who only has the `send_messages` permission, without the `view_activity` permission. We are doing this because we think there are a number of services with a lot of users who don’t need to see the dashboard, or the other team members, and that we can make a simpler interface for these users.
This commit is contained in:
@@ -185,7 +185,9 @@ class InvitedUser(object):
|
||||
return set(self.permissions) > set(permissions)
|
||||
|
||||
def has_permission_for_service(self, service_id, permission):
|
||||
return self.status != 'cancelled' and self.service == service_id and permission in self.permissions
|
||||
if self.status == 'cancelled' and permission != 'view_activity':
|
||||
return False
|
||||
return self.service == service_id and permission in self.permissions
|
||||
|
||||
def __eq__(self, other):
|
||||
return ((self.id,
|
||||
|
||||
Reference in New Issue
Block a user