This commit is contained in:
@@ -136,10 +136,12 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
|||||||
|
|
||||||
// work around to get the UserId populated in the User field of the struct
|
// work around to get the UserId populated in the User field of the struct
|
||||||
r.User.UserId = r.UserUserId
|
r.User.UserId = r.UserUserId
|
||||||
|
|
||||||
|
// For debugging purposes
|
||||||
debugPrint := utils.PrintStructContents(&r, 0)
|
debugPrint := utils.PrintStructContents(&r, 0)
|
||||||
log.Println(debugPrint)
|
log.Println(debugPrint)
|
||||||
|
|
||||||
// Don't decrypt the secrets in the results of this query
|
// Append the secrets to the query output, don't decrypt the secrets (we didn't SELECT them anyway)
|
||||||
secretResults = append(secretResults, r)
|
secretResults = append(secretResults, r)
|
||||||
}
|
}
|
||||||
log.Printf("SecretsGetAllowedForGroup retrieved '%d' results\n", len(secretResults))
|
log.Printf("SecretsGetAllowedForGroup retrieved '%d' results\n", len(secretResults))
|
||||||
|
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"smt/utils"
|
||||||
"smt/utils/token"
|
"smt/utils/token"
|
||||||
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
@@ -376,7 +377,10 @@ func UserGetSafesAllowed(userId int) ([]UserSafe, error) {
|
|||||||
log.Printf("UserGetSafesAllowed error parsing sql record : '%s'\n", err)
|
log.Printf("UserGetSafesAllowed error parsing sql record : '%s'\n", err)
|
||||||
return results, err
|
return results, err
|
||||||
}
|
}
|
||||||
log.Printf("UserGetSafesAllowed adding record : '%+v'\n", us)
|
//log.Printf("UserGetSafesAllowed adding record : '%+v'\n", us)
|
||||||
|
debugPrint := utils.PrintStructContents(&us, 0)
|
||||||
|
log.Printf("UserGetSafesAllowed adding record :\n%s\n", debugPrint)
|
||||||
|
|
||||||
results = append(results, us)
|
results = append(results, us)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user