Skip to content

Fix RBAC mappings for 'systems.profiles' namespace (bsc#1271963) - #12339

Open
cbbayburt wants to merge 2 commits into
uyuni-project:masterfrom
cbbayburt:bsc1271963
Open

Fix RBAC mappings for 'systems.profiles' namespace (bsc#1271963)#12339
cbbayburt wants to merge 2 commits into
uyuni-project:masterfrom
cbbayburt:bsc1271963

Conversation

@cbbayburt

@cbbayburt cbbayburt commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

This PR fixes RBAC mappings for the systems.profiles namespace:

  • Add missing endpoints
  • Collect all related endpoints into systems.profiles
  • Fix conditional rendering of 'Profiles' tab in the system details menu

Documentation

  • No documentation needed: Bugfix

Test coverage

  • No tests: RBAC mappings are not covered

Links

Issue(s): https://github.com/SUSE/spacewalk/issues/31292
Port: https://github.com/SUSE/spacewalk/pull/31392

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "frontend_checks"
  • Re-run test "spacecmd_unittests"

Before you merge

Check How to branch and merge properly!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes RBAC data for the systems.profiles namespace so package profile UI endpoints are properly grouped and described, and updates the system-details navigation to use the corrected namespace for the “Profiles” tab.

Changes:

  • Add/seed missing package profile endpoints (CompareProfiles POST, CompareSystems GET/POST) and map them into systems.profiles.
  • Move existing package profile endpoints from systems.software.packages into systems.profiles (R/W split) and add namespace descriptions.
  • Update the system details navigation “Profiles” tab ACL to reference systems.profiles.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
schema/spacewalk/upgrade/susemanager-schema-5.2.9-to-susemanager-schema-5.2.10/100-rbac-package-profiles.sql Upgrade migration to set systems.profiles descriptions, move endpoint namespace mappings, and add missing endpoints/mappings.
schema/spacewalk/susemanager-schema.changes.cbbayburt.bsc1271963 Schema changelog entry for the RBAC endpoint additions.
schema/spacewalk/common/data/namespace.sql Seed systems.profiles namespace rows with descriptions (R/W).
schema/spacewalk/common/data/endpointNamespace.sql Seed endpoint-to-namespace mappings so profile endpoints belong to systems.profiles (R/W).
schema/spacewalk/common/data/endpoint.sql Seed missing CompareProfiles/CompareSystems endpoints.
java/webapp/src/main/webapp/WEB-INF/nav/system_detail.xml Switch “Profiles” tab ACL to authorized_for(systems.profiles) for correct rendering.
java/spacewalk-java.changes.cbbayburt.bsc1271963 Java changelog entry for the navigation fix.
Comments suppressed due to low confidence (1)

schema/spacewalk/upgrade/susemanager-schema-5.2.9-to-susemanager-schema-5.2.10/100-rbac-package-profiles.sql:28

  • Typo in the comment: the namespace used throughout this migration is systems.profiles (plural), but this comment says system.profiles (singular).
-- Move package profile related (modify) endpoints to 'system.profiles' namespace

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread java/webapp/src/main/webapp/WEB-INF/nav/system_detail.xml
@cbbayburt
cbbayburt force-pushed the bsc1271963 branch 3 times, most recently from 585552b to c125967 Compare July 27, 2026 13:29
@cbbayburt
cbbayburt marked this pull request as ready for review July 27, 2026 14:18
@cbbayburt
cbbayburt requested review from a team as code owners July 27, 2026 14:18
@cbbayburt
cbbayburt requested review from mcalmer and parlt91 and removed request for a team July 27, 2026 14:18

@parlt91 parlt91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the failing changelog test it looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants