Skip to content

Commit 4fc0739

Browse files
committed
fix(graph): Don't use hardcoded groupOfNames in group creation
1 parent d4e9265 commit 4fc0739

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Don't use hardcoded groupOfNames in group creation
2+
3+
When creating a group with different objectClass, it will always use groupOfNames instead of the one provided in the config.
4+
The server now creates groups using the objectClass defined in the config
5+
6+
https://github.com/owncloud/ocis/pull/11776

services/graph/pkg/identity/ldap_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func (i *LDAP) getGroupCreateLDAPDN(group libregraph.Group) string {
436436
func (i *LDAP) groupToLDAPAttrValues(group libregraph.Group) (map[string][]string, error) {
437437
attrs := map[string][]string{
438438
i.groupAttributeMap.name: {group.GetDisplayName()},
439-
"objectClass": {"groupOfNames", "top"},
439+
"objectClass": {i.groupObjectClass, "top"},
440440
// This is a crutch to allow groups without members for LDAP servers
441441
// that apply strict Schema checking. The RFCs define "member/uniqueMember"
442442
// as required attribute for groupOfNames/groupOfUniqueNames. So we

0 commit comments

Comments
 (0)