Skip to content

User Groups: Add ability to manage users directly from the group workspace#22215

Merged
leekelleher merged 21 commits into
mainfrom
v17/feature/manage-users-from-group
Apr 21, 2026
Merged

User Groups: Add ability to manage users directly from the group workspace#22215
leekelleher merged 21 commits into
mainfrom
v17/feature/manage-users-from-group

Conversation

@NguyenThuyLan

@NguyenThuyLan NguyenThuyLan commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes

Description

  • Adds a Users panel to the User Group details workspace view, allowing administrators to add or remove users directly from the group editor — without having to navigate to each user individually.
  • The workspace context now loads the current users of the group on open, tracks pending additions/removals client-side, and persists the changes via the Management API on save.
  • The changes are properly integrated into the workspace's dirty-state detection (getHasUnpersistedChanges), so the "unsaved changes" guard triggers when users are added or removed.
image

Test plan

  • Open an existing user group — the Users panel should display the current members of the group.
  • Add a user to the group and save — the user should be persisted to the group via the API.
  • Remove a user from the group and save — the user should be removed via the API.
  • Create a new user group with users selected — users should be added after the group is created.

@NguyenThuyLan NguyenThuyLan marked this pull request as draft March 23, 2026 04:57
@NguyenThuyLan NguyenThuyLan marked this pull request as ready for review March 23, 2026 08:02

@AndyButland AndyButland 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.

I've only given this a quick look-over @NguyenThuyLan, so you have some feedback for the start of your working day. Please see what you think on my comments. I'll try to pull it down for some testing when I'm in tomorrow.

@NguyenThuyLan

Copy link
Copy Markdown
Contributor Author

Done, I separated the user list into a separate element, so when adding or removing users from the list, it will be saved instantly

@AndyButland AndyButland 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.

Looks great and works correctly @NguyenThuyLan.

I see now that adding or removing users from the list happens immediately - I don't have to press "Save". From the discussions I've seen you've had with @nielslyngsoe , that looks as expected. Longer term I think it would be better if this occurred on "Save" though, as the "Users" list is within the workspace and looks like it should be persisted only when you save.

Comments to consider are mostly around the edge-case of > 100 users in the group.

@AndyButland AndyButland 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.

Just one tiny thing then I would say this looks good to me, on the understanding that the intention is to be able to provide a paged list further down the line. It will already meet the need for most projects.

I'll approve but think this needs @nielslyngsoe to look over too before merging.

Comment thread src/Umbraco.Web.UI.Client/src/assets/lang/en.ts Outdated
@NguyenThuyLan

Copy link
Copy Markdown
Contributor Author

Thanks @nielslyngsoe ,everything has been updated. Please let me know if anything else is needed

@nielslyngsoe

Copy link
Copy Markdown
Member

Changes look good to me, so please have someone verifying that it works as expected :-)

@AndyButland

Copy link
Copy Markdown
Contributor

I'll take one further look over from a testing perspective @NguyenThuyLan - than I take it from your comment above @nielslyngsoe that this is OK to merge.

@leekelleher

Copy link
Copy Markdown
Member

@AndyButland I was giving this a quick review, (@NguyenThuyLan asked if I had time). Overall, I'm happy with it, but had the same thoughts as you outlined about the "Save" (#22215 (review)) and pagination (#22215 (review)). If these are going to be address later, then all good.

@AndyButland

Copy link
Copy Markdown
Contributor

OK, if you've tested it out @leekelleher we can merge this in my view. As I understand we need a bit more plumbing to allow other actions to hook into the "Save" for a workspace before we can support delegating the save to this operation.

@leekelleher leekelleher merged commit e4e6e04 into main Apr 21, 2026
31 checks passed
@leekelleher leekelleher deleted the v17/feature/manage-users-from-group branch April 21, 2026 08:45
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.

5 participants