From 9a2a68d3dca4ea6179bdbd9220225c00b41b5be7 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 8 Oct 2024 11:42:43 +0200 Subject: [PATCH] fix: add OCIS_LDAP_USER_SCHEMA_DISPLAYNAME to graph service Fixes: #10257 --- changelog/fix-graph-ldap-schema-displayname.md | 10 ++++++++++ services/graph/pkg/config/config.go | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 changelog/fix-graph-ldap-schema-displayname.md diff --git a/changelog/fix-graph-ldap-schema-displayname.md b/changelog/fix-graph-ldap-schema-displayname.md new file mode 100644 index 000000000..c4da052b2 --- /dev/null +++ b/changelog/fix-graph-ldap-schema-displayname.md @@ -0,0 +1,10 @@ +Bugfix: graph service now supports `OCIS_LDAP_USER_SCHEMA_DISPLAYNAME` env var + +To align with the other services the graph service now supports the +`OCIS_LDAP_USER_SCHEMA_DISPLAYNAME` environment variable to configure the LDAP +attribute that is used for display name attribute of users. + +`LDAP_USER_SCHEMA_DISPLAY_NAME` is now deprecated and will be removed in a future +release. + +https://github.com/owncloud/ocis/issues/10257 diff --git a/services/graph/pkg/config/config.go b/services/graph/pkg/config/config.go index 20f46b8b1..b5ef945c1 100644 --- a/services/graph/pkg/config/config.go +++ b/services/graph/pkg/config/config.go @@ -66,7 +66,7 @@ type LDAP struct { UserFilter string `yaml:"user_filter" env:"OCIS_LDAP_USER_FILTER;GRAPH_LDAP_USER_FILTER" desc:"LDAP filter to add to the default filters for user search like '(objectclass=ownCloud)'." introductionVersion:"pre5.0"` UserObjectClass string `yaml:"user_objectclass" env:"OCIS_LDAP_USER_OBJECTCLASS;GRAPH_LDAP_USER_OBJECTCLASS" desc:"The object class to use for users in the default user search filter ('inetOrgPerson')." introductionVersion:"pre5.0"` UserEmailAttribute string `yaml:"user_mail_attribute" env:"OCIS_LDAP_USER_SCHEMA_MAIL;GRAPH_LDAP_USER_EMAIL_ATTRIBUTE" desc:"LDAP Attribute to use for the email address of users." introductionVersion:"pre5.0"` - UserDisplayNameAttribute string `yaml:"user_displayname_attribute" env:"LDAP_USER_SCHEMA_DISPLAY_NAME;GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE" desc:"LDAP Attribute to use for the display name of users." introductionVersion:"pre5.0"` + UserDisplayNameAttribute string `yaml:"user_displayname_attribute" env:"OCIS_LDAP_USER_SCHEMA_DISPLAYNAME;LDAP_USER_SCHEMA_DISPLAY_NAME;GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE" desc:"LDAP Attribute to use for the display name of users." introductionVersion:"pre5.0" deprecationVersion:"%%NEXT_PRODUCTION_VERSION%%" deprecationInfo:"LDAP_USER_SCHEMA_DISPLAY_NAME changing name for consistency" deprecationReplacement:"OCIS_LDAP_USER_SCHEMA_DISPLAYNAME"` UserNameAttribute string `yaml:"user_name_attribute" env:"OCIS_LDAP_USER_SCHEMA_USERNAME;GRAPH_LDAP_USER_NAME_ATTRIBUTE" desc:"LDAP Attribute to use for username of users." introductionVersion:"pre5.0"` UserIDAttribute string `yaml:"user_id_attribute" env:"OCIS_LDAP_USER_SCHEMA_ID;GRAPH_LDAP_USER_UID_ATTRIBUTE" desc:"LDAP Attribute to use as the unique ID for users. This should be a stable globally unique ID like a UUID." introductionVersion:"pre5.0"` UserIDIsOctetString bool `yaml:"user_id_is_octet_string" env:"OCIS_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING;GRAPH_LDAP_USER_SCHEMA_ID_IS_OCTETSTRING" desc:"Set this to true if the defined 'ID' attribute for users is of the 'OCTETSTRING' syntax. This is required when using the 'objectGUID' attribute of Active Directory for the user ID's." introductionVersion:"pre5.0"`