work on determining which secrets accessible to user
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -35,6 +35,7 @@ type UserGroup struct {
|
||||
Admin bool `db:"Admin"`
|
||||
}
|
||||
|
||||
// Combine Users and Safes to determine which safes a user has access to
|
||||
type UserSafe struct {
|
||||
User
|
||||
SafeId int `db:"SafeId"`
|
||||
@@ -42,6 +43,13 @@ type UserSafe struct {
|
||||
GroupId int `db:"GroupId"`
|
||||
}
|
||||
|
||||
// Used for querying all secrets the user has access to
|
||||
type UserSecret struct {
|
||||
User
|
||||
Group
|
||||
Secret
|
||||
}
|
||||
|
||||
func (u *User) SaveUser() (*User, error) {
|
||||
|
||||
var err error
|
||||
|
Reference in New Issue
Block a user