Skip to content

SAK-52325 Site Info Joinable Set Group restrictions#14357

Open
st-manu wants to merge 2 commits intosakaiproject:masterfrom
st-manu:SAK-52325
Open

SAK-52325 Site Info Joinable Set Group restrictions#14357
st-manu wants to merge 2 commits intosakaiproject:masterfrom
st-manu:SAK-52325

Conversation

@st-manu
Copy link
Contributor

@st-manu st-manu commented Feb 4, 2026

https://sakaiproject.atlassian.net/browse/SAK-52325

Summary by CodeRabbit

  • New Features

    • Restrict joinable set participation to selected groups when creating or editing.
    • UI shows group restrictions for administrators and in group listings.
    • Users blocked from joining restricted sets receive a clear informational message.
    • Prevents deletion of groups that are used as restrictions; admins are notified.
  • Localization

    • Added messages and help text for restriction UI and join-block alert.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Walkthrough

Adds group-restriction support for joinable sets: new property constant, form fields, controller logic to load/save/remove restrictions, UI and client-side controls to select allowed groups, and site-tool checks that filter and block join attempts based on group membership.

Changes

Cohort / File(s) Summary
Constants & Form Model
site-manage/site-group-manager/src/main/java/org/sakaiproject/groupmanager/constants/GroupManagerConstants.java, site-manage/site-group-manager/src/main/java/org/sakaiproject/groupmanager/form/JoinableSetForm.java
Added GROUP_PROP_JOINABLE_ALLOWED_GROUPS constant and form fields restrictToGroups (boolean) and allowedGroups (List) to represent restriction state and selected allowed groups.
Joinable Set Controller
site-manage/site-group-manager/src/main/java/org/sakaiproject/groupmanager/controller/JoinableSetController.java
Load available non-joinable site groups into model; read/write joinable-set restriction metadata (group-prop-joinable-allowed-groups) when loading, saving, creating, and deleting joinable sets; validate selection when restrictions enabled; update/remove group properties accordingly.
Main Controller
site-manage/site-group-manager/src/main/java/org/sakaiproject/groupmanager/controller/MainController.java
Collect per-group restriction mappings for view; mark groups referenced by joinable-set restrictions as locked for deletion; prevent deletion of groups referenced by restrictions and return error listing those groups.
Site Tool Join Handling
site-manage/site-manage-tool/tool/src/java/org/sakaiproject/site/tool/SiteAction.java
When displaying joinable groups and processing join requests, read group-prop-joinable-allowed-groups, allow join only if user is a member of any allowed group, and show sinfo.list.joinable.restrictedToGroups alert when blocked.
UI Templates
site-manage/site-group-manager/src/main/webapp/WEB-INF/templates/index.html, site-manage/site-group-manager/src/main/webapp/WEB-INF/templates/joinable_set.html
Added Restrictions column to index view and a restriction UI block in joinable_set form: a restrict checkbox and multi-select of available groups (preselection supported).
Client-side Scripts
site-manage/site-group-manager/src/main/webapp/WEB-INF/templates/fragments/javascript.html
Added null-safety checks and handlers for restrictToGroups UI elements; toggle visibility of restriction options and adjusted form validation to guard against missing elements.
Localization / Messages
site-manage/site-group-manager/src/main/resources/Messages.properties, site-manage/site-manage-tool/tool/src/bundle/sitesetupgeneric.properties
Added localization keys for restriction UI labels, tooltips, validation error (joinableset.error.selectgroups), and user-facing join-block message sinfo.list.joinable.restrictedToGroups.
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'SAK-52325 Site Info Joinable Set Group restrictions' directly and clearly describes the main change: adding group restriction functionality to joinable sets in Site Info.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

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

There are accessibility issues in these changes.

@st-manu st-manu requested a review from ern February 5, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant