Show group display name when the group object is not loaded yet#56533
Show group display name when the group object is not loaded yet#56533kesselb wants to merge 2 commits into
Conversation
|
cc @artonge @come-nc @susnux @benjaminfrueh for early feedback as you were involved in the other pr's. |
3d8a69b to
ace2275
Compare
There was a problem hiding this comment.
I see that we could instead provide the group mapping in another property in the response:
server/apps/provisioning_api/lib/Controller/UsersController.php
Lines 202 to 204 in a2a1f52
So the endpoints could contain:
{
"users": [
{
"id": "user1",
"group": ["group1"]
},
{
"id": "user2",
"group": ["group1", "group2"]
}
],
"groups": [
{
"id": "group1",
"display_name": "Group 1"
},
{
"id": "group2",
"display_name": "Group 2"
}
]
}Compare to the current proposal, in which the mapping is contained multiple time in each user object.
What do you think?
adb0fb5 to
2fcfd0f
Compare
artonge
left a comment
There was a problem hiding this comment.
Looks good, only one question
d4f2d7e to
7a21aa5
Compare
|
/backport to stable34 |
1e84275 to
b726587
Compare
|
Thanks for your input! I've marked the conversation about addGroup as resolved. Copilot flagged that this change could add an incomplete group object to the store. The previous implementation of addGroup would not update a group with the correct usercount once it was later fetched with full details. That's addressed now by updating an existing group instead, as suggested. On master, groups assigned to a user (part of the user response) that aren't yet known to the frontend store aren't shown in the user list and edit dialog. This is fixed by sending the id => displayname mapping along with the user list response and adding those groups to the store. However, that group object is incomplete so the count is only shown once the user scrolls down the group list (which loads the full group details). I'd hope this is an acceptable trade-off: not seeing the group at all vs. seeing the group with the right name but a missing count. This was originally reported against an older version where the group id was shown but only the display name was missing; a recent change made that worse. Looking forward to your feedback. |
b726587 to
02b2e84
Compare
02b2e84 to
961afd4
Compare
By default only 25 group objects are loaded. If a user is assigend to a group, that isn't loaded yet, we only show the gid instead of the displayname. Assisted-by: Copilot:gpt-5.4 Assisted-by: ClaudeCode:claude-sonnet-5 Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
961afd4 to
56c7806
Compare
Summary
We are fetching the first 25 groups when opening the users list. If a user in that list has a group assigned that was not part of the first 25 groups, then we don't have the displayname.
Until:
STR
Preparation:
Helper script
Case 1:
Case 2:
Case 3:
occ group:add --display-name "Test Group Subadmin" group_subadminCase 4:
Checklist
3. to review, feature component)stable32)