Add update_organization_integration permission for org owners
What does this MR do and why?
Uses update_integration permission so organization owners and instance admins can manage an organization's integration defaults.
Today no permission exists for this, so the organization admin pages cannot check who may open them. This MR adds the permission definition and grants it to the admin and organization_owner roles.
Organizations::OrganizationPolicy already derives its abilities from the role YAML (enable(*Authz::Role.get(role).permissions(:organization))), so no policy code change is needed.
This is groundwork for Serve integrations pages in org admin area (#631291 - closed), which will use this permission to replace the !Gitlab.com? gate currently hiding the instance-level integration defaults pages.
References
Part of Add org owner permission to manage integrations (#631290 - closed), part of the Org-level CRUD for Integrations (gitlab-org#22859) epic.
Screenshots or screen recordings
Not applicable — this is a backend-only permission change with no UI surface yet.
How to set up and validate locally
- In a Rails console:
user = User.find_by(username: 'root')
organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization: organization, user: user, access_level: :owner)
user.can?(:update_integration, organization) # => true- Run the policy spec: bundle exec rspec spec/policies/organizations/organization_policy_spec.rb
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #631290 (closed)