This commit is contained in:
@@ -31,7 +31,7 @@ type Secret struct {
|
||||
// Since there are some ambiguous column names (eg UserName is present in both users and secrets table), the order of fields in this struct matters
|
||||
type UserSecret struct {
|
||||
Secret
|
||||
UserId int `db:"UserUserId"`
|
||||
UserUserId int `db:"UserUserId"`
|
||||
User
|
||||
//Group
|
||||
Permission
|
||||
@@ -133,6 +133,9 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
||||
return secretResults, err
|
||||
}
|
||||
//log.Printf("r: %v\n", r)
|
||||
|
||||
// work around to get the UserId populated in the User field of the struct
|
||||
r.User.UserId = r.UserUserId
|
||||
debugPrint := utils.PrintStructContents(&r, 0)
|
||||
log.Println(debugPrint)
|
||||
|
||||
|
Reference in New Issue
Block a user