From e9bdb91e014decdc238363460e1424548aaab267 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Wed, 16 Aug 2023 13:31:15 +0800 Subject: [PATCH] fix: ignore salt on marshal `model.User` --- internal/model/user.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/model/user.go b/internal/model/user.go index 5bc2850d97c..c768f3130f5 100644 --- a/internal/model/user.go +++ b/internal/model/user.go @@ -24,10 +24,10 @@ type User struct { ID uint `json:"id" gorm:"primaryKey"` // unique key Username string `json:"username" gorm:"unique" binding:"required"` // username PwdHash string `json:"-"` // password hash - Salt string // unique salt - Password string `json:"password"` // password - BasePath string `json:"base_path"` // base path - Role int `json:"role"` // user's role + Salt string `json:"-"` // unique salt + Password string `json:"password"` // password + BasePath string `json:"base_path"` // base path + Role int `json:"role"` // user's role Disabled bool `json:"disabled"` // Determine permissions by bit // 0: can see hidden files