mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-03 23:51:22 -04:00
Note existing live services in go live ticket
It’s useful for analysing our growth to know if someone who’s requesting to go live is already a live user of Notify.
This commit is contained in:
@@ -219,6 +219,11 @@ class UserApiClient(NotifyAdminAPIClient):
|
||||
), [])
|
||||
return sorted(all_services, key=lambda service: service['name'])
|
||||
|
||||
def user_has_live_services(self, user):
|
||||
return not all(
|
||||
service['restricted'] for service in self.get_services_for_user(user)
|
||||
)
|
||||
|
||||
def get_service_ids_for_user(self, user):
|
||||
return {
|
||||
service['id'] for service in self.get_services_for_user(user)
|
||||
|
||||
Reference in New Issue
Block a user