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_achievement to maintainer in group scope, next to award_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

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

Merge request reports

Loading
Loading