Backport of 'Fix self-managed admin/owner cannot enroll namespaces into Orbit'
What does this MR do and why?
Backport of !246338 (merged).
Patch application: the net diff from !246338 (merged) did not apply cleanly to 19-0-stable-ee. Adaptations:
Click to expand
ee/app/policies/ee/group_policy.rb- the policy change itself (removing theknowledge_graph_saas_modecondition and the SaaS gate from the prevent rule) is semantically identical, but the surrounding code differs at 19.0 (theknowledge_graph_namespace_eligiblecondition useslicensed_feature_available?(:orbit)directly instead of theOrbitLicense.namespace_enrollable_or_enrolled?helper added later). Applied manually at the correct line offsets.ee/app/assets/javascripts/orbit/components/orbit_explore_empty_state.vue- on 19.0, the i18n string is defined in aconst i18nobject at the top of the script section (line 16), not inline in the template. Changed the string in the i18n object.ee/spec/frontend/orbit/components/orbit_explore_empty_state_spec.js- this file does not exist on19-0-stable-ee. Skipped (the vue component string change is still covered by the i18n object edit).ee/spec/policies/ee/group_policy_spec.rb- the 19.0 spec lacks theorbit_enroll_namespacefeature flag contexts that exist on master. Adapted the spec to the 19.0 structure: split the existing single context into "when on self-managed" and "when on SaaS" branches, with admin/owner/maintainer/guest assertions matching the master MR's intent. The "when on SaaS" context retains the original assertions; the "when on self-managed" context adds admin-mode and owner-allowed assertions.ee/spec/requests/api/graphql/group/knowledge_graph_spec.rb- applied cleanly (identical context lines at 19.0).locale/gitlab.pot- line offsets differ. Applied manually (added the new string, removed the old one).
Related to #606374 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
- The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
- The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
- Required labels have been applied to this merge request
- severity label and bug subtype labels (if applicable)
- If this MR fixes a bug that affects customers, the customer label has been applied.
- This MR has been approved by a maintainer (only one approval is required).
- Ensure the
e2e:test-on-omnibus-eejob has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.
Note to the merge request author and maintainer
If you have questions about the patch release process, please:
- Refer to the patch release runbook for engineers and maintainers for guidance.
- Ask questions on the
#releasesSlack channel (internal only). - Once the backport has been merged, the commit changes will be automatically deployed to a release environment that can be used for manual validation. See after merging runbook for details.
Edited by Dmitry Gruzd