Loading
Check revoke_achievement when revoking achievements
What does this MR do and why?
The Revoke achievement mutation and Achievements::RevokeService checked award_achievement for users, but the token check asks for revoke_achievement. This switches the user check to revoke_achievement so both name the same permission.
- Grants
revoke_achievementto maintainer in group scope, next toaward_achievement, and blocks it on archived groups. - The mutation and the service check
revoke_achievement.
No one gains or loses access. Follow-up from https://gitlab.com/gitlab-org/gitlab/-/work_items/565466.
References
- https://gitlab.com/gitlab-org/gitlab/-/work_items/565466
- https://gitlab.com/groups/gitlab-org/-/work_items/20207
Screenshots or screen recordings
No UI change.
How to set up and validate locally
bin/rspec spec/graphql/mutations/achievements/revoke_spec.rb spec/services/achievements/revoke_service_spec.rb spec/policies/group_policy_spec.rb