From 34e5053d6953d5bb7d51b68debd53f104ee27156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sw=C3=A4rd?= Date: Thu, 23 Mar 2023 12:29:07 +0100 Subject: [PATCH] graph: Add UserTypeAttribute to reva config. --- services/users/pkg/config/config.go | 1 + services/users/pkg/revaconfig/config.go | 1 + 2 files changed, 2 insertions(+) diff --git a/services/users/pkg/config/config.go b/services/users/pkg/config/config.go index 58051543e2..c47afbbc6d 100644 --- a/services/users/pkg/config/config.go +++ b/services/users/pkg/config/config.go @@ -86,6 +86,7 @@ type LDAPDriver struct { GroupObjectClass string `yaml:"group_object_class" env:"LDAP_GROUP_OBJECTCLASS;USERS_LDAP_GROUP_OBJECTCLASS" desc:"The object class to use for groups in the default group search filter like 'groupOfNames'. "` IDP string `yaml:"idp" env:"OCIS_URL;OCIS_OIDC_ISSUER;USERS_IDP_URL" desc:"The identity provider value to set in the userids of the CS3 user objects for users returned by this user provider."` DisableUserMechanism string `yaml:"disable_user_mechanism" env:"LDAP_DISABLE_USER_MECHANISM;USERS_LDAP_DISABLE_USER_MECHANISM" desc:"An option to control the behavior for disabling users. Valid options are 'none', 'attribute' and 'group'. If set to 'group', disabling a user via API will add the user to the configured group for disabled users, if set to 'attribute' this will be done in the ldap user entry, if set to 'none' the disable request is not processed."` + UserTypeAttribute string `yaml:"user_type_attribute" env:"LDAP_USER_SCHEMA_USER_TYPE;USERS_LDAP_USER_TYPE_ATTRIBUTE" desc:"LDAP Attribute to distinguish between 'Member' and 'Guest' users. Default is 'ownCloudUserType'."` LdapDisabledUsersGroupDN string `yaml:"ldap_disabled_users_group_dn" env:"LDAP_DISABLED_USERS_GROUP_DN;USERS_LDAP_DISABLED_USERS_GROUP_DN" desc:"The distinguished name of the group to which added users will be classified as disabled when 'disable_user_mechanism' is set to 'group'."` UserSchema LDAPUserSchema `yaml:"user_schema"` GroupSchema LDAPGroupSchema `yaml:"group_schema"` diff --git a/services/users/pkg/revaconfig/config.go b/services/users/pkg/revaconfig/config.go index 35400f1d6d..47b86f205d 100644 --- a/services/users/pkg/revaconfig/config.go +++ b/services/users/pkg/revaconfig/config.go @@ -80,6 +80,7 @@ func ldapConfigFromString(cfg config.LDAPDriver) map[string]interface{} { "group_objectclass": cfg.GroupObjectClass, "user_disable_mechanism": cfg.DisableUserMechanism, "user_enabled_property": cfg.UserSchema.Enabled, + "user_type_property": cfg.UserTypeAttribute, "group_local_disabled_dn": cfg.LdapDisabledUsersGroupDN, "idp": cfg.IDP, "user_schema": map[string]interface{}{