-
-
Notifications
You must be signed in to change notification settings - Fork 1k
SAK-52287 Samigo honor assessment.all.groups for group releases #14333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThis change implements runtime authorization filtering for group-based release enrollments in the SectionAwareServiceHelperImpl class. When users lack the AUTHZ_ASSESSMENT_ALL_GROUPS permission, the code restricts release group filtering to only the intersection of site groups the user belongs to and those required by the published assessment. Changes
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
kernel/kernel-impl/src/main/sql/mysql/sakai_realm.sql (1)
727-735: Remove duplicate assessment.all.groups grant (Line 727 vs Line 735).The same realm/role/function is inserted twice, which will fail on the
(REALM_KEY, ROLE_KEY, FUNCTION_KEY)PK during schema load.🛠️ Proposed fix (remove the earlier duplicate)
-INSERT INTO SAKAI_REALM_RL_FN VALUES((select REALM_KEY from SAKAI_REALM where REALM_ID = '!site.template'), (select ROLE_KEY from SAKAI_REALM_ROLE where ROLE_NAME = 'maintain'), (select FUNCTION_KEY from SAKAI_REALM_FUNCTION where FUNCTION_NAME = 'assessment.all.groups'));
🤖 Fix all issues with AI agents
In `@kernel/kernel-impl/src/main/sql/oracle/sakai_realm.sql`:
- Around line 739-741: The INSERT into SAKAI_REALM_RL_FN that uses
REALM_ID='!site.template', ROLE_NAME='maintain' and
FUNCTION_NAME='assessment.all.groups' is duplicated (same triple appears
elsewhere) and will violate the primary key on load; remove the redundant INSERT
statement (the one inserting the assessment.all.groups mapping) so only a single
SAKAI_REALM_RL_FN row exists for that (REALM_KEY from SAKAI_REALM where
REALM_ID='!site.template', ROLE_KEY from SAKAI_REALM_ROLE where
ROLE_NAME='maintain', FUNCTION_KEY from SAKAI_REALM_FUNCTION where
FUNCTION_NAME='assessment.all.groups').
🧹 Nitpick comments (1)
kernel/kernel-impl/src/main/sql/mysql/sakai_realm.sql (1)
727-728: Confirm upgrade/backfill in sakai-reference conversion scripts.Please verify the corresponding conversion SQL exists so upgrades get
assessment.all.groupsgrants (not just new installs).If you want, I can help draft the conversion SQL for sakai-reference. Based on learnings, ensure this lands under
docs/conversionin that repo.
c83e98c to
19fa4ec
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.