Repository navigation
Conversation
A class group's members come from the classes on each student's Profile, and
spring#309 lets only teachers and admins change them through POST and DELETE
/api/groups/{id}/members/{personId}. Members now shows Add and Remove on a class
group only to them (canChangeMembers). Everyone else sees the list, without the
Action column. With the search hidden, createDialog focuses the close button, so
focus stays in the dialog. isClassGroup now trims the name before comparing, as
Spring's ClassGroupMembershipService does.
svaka2000
added a commit
to svaka2000/Pages-JJ
that referenced
this pull request
Nov 26, 2026
…roup rule Open-Coding-Society#2088 hides Members' Action column on a class group for anyone who isn't a teacher or admin, so the dialog now toggles the column's header, and the tests give it one. A student no longer gets Add in a class group, so the class-group refusal test opens the dialog as a teacher.
Contributor
Author
|
Combined into #2091 with the same commits. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Open-Coding-Society/spring#309 lets only teachers and admins add or remove people in a class group (CSSE, CSP, CSA or CSH). The Members dialog on /dm still showed Add and Remove there to everyone, so once spring#309 is deployed, a student's click would just fail with "Could not add" or "Could not remove". Now only teachers and admins see them there.
A student opening Members on CSA:
A teacher opening the same dialog:
The student's dialog on a phone, in Light and Midnight:
Other notes:
_projects/systems/messages/.canChangeMembers(me, group)injs/messages-model.jsdecides it: true for ROLE_TEACHER or ROLE_ADMIN (the roles spring#309'sisStaffchecks) or for any group that isn't a class group.isClassGroupnow trims the name like Spring does, so a group named "CSA " is a class group on both sides.createDialoginjs/dialogs.jsnow focuses the firstdata-focusfield that is showing, or Close. The other dialogs on /dm always show theirs, so they don't change.createDialogchange and hides the same controls for mentors with itscanManageflag. The two conflict injs/group-dialogs.jsand one line ofAGENTS_MD_DOCUMENTATION.md. Whichever merges first, I'll update the other to usecanManage && canChangeMembers(me, group), and I tried that merge.tests/members_dialog.test.mjsand tests intests/messages_model.test.mjs, and updated the README and both AGENTS files.node --test _projects/systems/messages/tests/*.test.mjspasses.How to try it: