diff --git a/.gitignore b/.gitignore index 98660218e..f5ee13e22 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ src/portal/typings/ **/*npm-debug.log.* **/*yarn-error.log.* .idea/ +*.iml .DS_Store .project .vscode/ diff --git a/src/common/dao/group/usergroup.go b/src/common/dao/group/usergroup.go index 04bb528f2..e0aa1d226 100644 --- a/src/common/dao/group/usergroup.go +++ b/src/common/dao/group/usergroup.go @@ -116,6 +116,8 @@ func UpdateUserGroupName(id int, groupName string) error { // This is used for ldap and uaa authentication, such the usergroup can have an ID in Harbor. // the keyAttribute and combinedKeyAttribute are key columns used to check duplicate usergroup in harbor func OnBoardUserGroup(g *models.UserGroup, keyAttribute string, combinedKeyAttributes ...string) error { + g.LdapGroupDN = utils.TrimLower(g.LdapGroupDN) + o := dao.GetOrmer() created, ID, err := o.ReadOrCreate(g, keyAttribute, combinedKeyAttributes...) if err != nil {