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

Refactor Service Support permissions #1449

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

mec
Copy link
Collaborator

@mec mec commented Mar 21, 2024

We wanted to allow Service Support to:

  • edit any project details
  • change the project conversion or transfer date
  • change the assignment

It turned out most of this was already possible because we include Service
Support users in the project_assigned_to_user? policy method.

I found this really hard to follow, so I've taken it out and hopefully left
things a little simpler to follow.

This work also allows Service Support to change the assignment, something that
was not previously possible.

@mec mec force-pushed the chore/refactor-service-support-permissions branch from 340ead9 to 0c00036 Compare March 21, 2024 12:03
mec added 2 commits March 21, 2024 12:03
I was tasked with allowing service support users to edit projects and
got confused between the specs and policy.

Having `@user.is_service_support?` inside the
`project_assigned_to_user?` was too much for me, so I have moved it out
into the main method were it reads clearly which users can update a
project.
We want service support users to be able to change any of the
assignments.
@mec mec force-pushed the chore/refactor-service-support-permissions branch from 0c00036 to c0728b7 Compare March 21, 2024 12:03
@mec mec marked this pull request as ready for review March 21, 2024 12:05
spec/policies/project_policy_spec.rb Outdated Show resolved Hide resolved
Whilst earlier implementation allowed them to do this, we refactored that
so this work allows them to once again change the conversion or transfer
date on a project.
@mec mec force-pushed the chore/refactor-service-support-permissions branch from c0728b7 to 39b0d32 Compare March 25, 2024 08:29
Copy link

sonarcloud bot commented Mar 25, 2024

@mec mec merged commit bb310e3 into main Mar 25, 2024
7 checks passed
@mec mec deleted the chore/refactor-service-support-permissions branch March 25, 2024 08:36
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