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
  1. ee/app/policies/ee/group_policy.rb - the policy change itself (removing the knowledge_graph_saas_mode condition and the SaaS gate from the prevent rule) is semantically identical, but the surrounding code differs at 19.0 (the knowledge_graph_namespace_eligible condition uses licensed_feature_available?(:orbit) directly instead of the OrbitLicense.namespace_enrollable_or_enrolled? helper added later). Applied manually at the correct line offsets.
  2. ee/app/assets/javascripts/orbit/components/orbit_explore_empty_state.vue - on 19.0, the i18n string is defined in a const i18n object at the top of the script section (line 16), not inline in the template. Changed the string in the i18n object.
  3. ee/spec/frontend/orbit/components/orbit_explore_empty_state_spec.js - this file does not exist on 19-0-stable-ee. Skipped (the vue component string change is still covered by the i18n object edit).
  4. ee/spec/policies/ee/group_policy_spec.rb - the 19.0 spec lacks the orbit_enroll_namespace feature 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.
  5. ee/spec/requests/api/graphql/group/knowledge_graph_spec.rb - applied cleanly (identical context lines at 19.0).
  6. 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
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job 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:

Edited by Dmitry Gruzd

Merge request reports

Loading