graph: Add UserTypeAttribute to reva config.

This commit is contained in:
Daniel Swärd
2023-03-23 12:29:07 +01:00
parent b81d9266ef
commit 34e5053d69
2 changed files with 2 additions and 0 deletions

View File

@@ -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"`

View File

@@ -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{}{