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
|
// 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 {
|
type UserSecret struct {
|
||||||
Secret
|
Secret
|
||||||
UserId int `db:"UserUserId"`
|
UserUserId int `db:"UserUserId"`
|
||||||
User
|
User
|
||||||
//Group
|
//Group
|
||||||
Permission
|
Permission
|
||||||
@@ -133,6 +133,9 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
|||||||
return secretResults, err
|
return secretResults, err
|
||||||
}
|
}
|
||||||
//log.Printf("r: %v\n", r)
|
//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)
|
debugPrint := utils.PrintStructContents(&r, 0)
|
||||||
log.Println(debugPrint)
|
log.Println(debugPrint)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user