mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-23 09:29:14 -04:00
remove unnecessary invocations of has_permissions(..., any_=True)
when added to a service, all users are given the view_activity permission. So, if that's included in the list, we don't need `any_`, and we don't need any of the other permissions.
This commit is contained in:
@@ -133,7 +133,7 @@ class UserApiClient(NotifyAdminAPIClient):
|
||||
def get_count_of_users_with_permission(self, service_id, permission):
|
||||
return len([
|
||||
user for user in self.get_users_for_service(service_id)
|
||||
if user.has_permissions(permission, any_=True)
|
||||
if user.has_permissions(permission)
|
||||
])
|
||||
|
||||
def get_users_for_organisation(self, org_id):
|
||||
|
||||
Reference in New Issue
Block a user