some improvements
This commit is contained in:
parent
c9dfecc519
commit
804842e7c5
4 changed files with 47 additions and 23 deletions
|
|
@ -39,9 +39,12 @@ func (db *DB) GetUsers() (users core.Users, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (db *DB) GetUserWithoutPassword(username string) (u *core.User, err error) {
|
||||
func (db *DB) GetUserWithoutSecrets(username string) (u *core.User, err error) {
|
||||
u, err = db.GetUser(username)
|
||||
u.Password = ""
|
||||
if u.Secret != "" {
|
||||
u.Secret = "redacted"
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue