Skip to content

Commit e71b04f

Browse files
committed
Groups: description and organization of groups are now visible for non-admins.
1 parent 28fd4bc commit e71b04f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

projectforge-rest/src/main/kotlin/org/projectforge/rest/GroupPagesRest.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ class GroupPagesRest : AbstractDTOPagesRest<GroupDO, Group, GroupDao>(
149149
userAccess = userAccess,
150150
)
151151
.add(lc, "name")
152-
if (userGroupCache.isUserMemberOfAdminGroup) {
153-
agGrid.add(lc, "organization", "description", wrapText = true)
154-
}
152+
agGrid.add(lc, "organization", "description", wrapText = true)
155153
agGrid.add(
156154
lc,
157155
"assignedUsers",

projectforge-rest/src/main/kotlin/org/projectforge/rest/dto/Group.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ class Group(
7676
copyFromMinimal(src)
7777
if (userGroupCache.isUserMemberOfAdminGroup) {
7878
super.copyFrom(src)
79+
} else {
80+
// Only copy fields that are allowed for non-admin users:
81+
description = src.description
82+
organization = src.organization
7983
}
8084
// Assigned users are visible for all users (for double-checking leavers):
8185
val newAssignedUsers = mutableSetOf<User>()

0 commit comments

Comments
 (0)