Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend user client to count users with permission #1891

Closed
wants to merge 2 commits into from

Conversation

quis
Copy link
Member

@quis quis commented Feb 21, 2018

One of the things we need to know for a service to go live is whether they have at least two users with the ‘manage service’ permission.

So this commit adds a method to the client to count how many users have a given permission. We can do logic on this count later. But having the counting done in the client feels like a cleaner separation of concerns.

Meant some refactoring of the way service_id is extracted from the request, in order to make it easier to mock.

quis added 2 commits February 21, 2018 10:22
Want to make sure it’s doing what I expect before I build another method
that calls through to it.
One of the things we need to know for a service to go live is whether
they have at least two users with the ‘manage service’ permission.

So this commit adds a method to the client to count how many users have
a given permission. We can do logic on this count later. But having the
counting done in the client feels like a cleaner separation of concerns.

Meant some refactoring of the way `service_id` is extracted from the
request, in order to make it easier to mock.
@quis quis mentioned this pull request Feb 26, 2018
@quis quis closed this in #1904 Feb 26, 2018
@quis quis deleted the user-client-enough-with-manage branch February 26, 2018 10:03
quis added a commit that referenced this pull request Feb 27, 2018
One of the things that we want to check before a service goes live is
that they have at least two team members with the manage service
permission. Anyone who can make a request to go live has this
permission, so that means one additional user is needed. This is what we
can automatically communicate to the user.

Under the hood this makes use of the logic added in
#1891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants