creating ldap user was not setting ldapuser flag
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-04-02 14:41:15 +11:00
parent a78f2b7c88
commit 5719ce8f5d
2 changed files with 3 additions and 7 deletions

View File

@@ -124,6 +124,7 @@ func AddUser(c *gin.Context) {
u := models.User{} u := models.User{}
u.UserName = input.UserName u.UserName = input.UserName
u.Password = input.Password u.Password = input.Password
u.LdapUser = input.LdapUser
// Determine which GroupId to save // Determine which GroupId to save
// Can be specified either by GroupName or GroupId in the request // Can be specified either by GroupName or GroupId in the request

View File

@@ -176,13 +176,8 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
r.User.UserName = r.UserUserName r.User.UserName = r.UserUserName
// For debugging purposes // For debugging purposes
debugPrint := utils.PrintStructContents(&r, 0) //debugPrint := utils.PrintStructContents(&r, 0)
log.Println(debugPrint) //log.Println(debugPrint)
//log.Printf("SecretsGetAllowed performed debug print\n")
// Append the secrets to the query output, don't decrypt the secrets (we didn't SELECT them anyway)
//secretResults = append(secretResults, r)
// Use generics and the GetID() method on the UserSecret struct // Use generics and the GetID() method on the UserSecret struct
// to avoid adding this element to the results // to avoid adding this element to the results