diff --git a/http/auth.go b/http/auth.go index 7318660f..9bbe8463 100644 --- a/http/auth.go +++ b/http/auth.go @@ -84,6 +84,7 @@ type userInfo struct { Locale string `json:"locale"` ViewMode types.ViewMode `json:"viewMode"` Perm types.Permissions `json:"perm"` + Commands []string `json:"commands"` LockPassword bool `json:"lockPassword"` } @@ -143,6 +144,7 @@ func (e *Env) printToken(w http.ResponseWriter, r *http.Request, user *types.Use ViewMode: user.ViewMode, Perm: user.Perm, LockPassword: user.LockPassword, + Commands: user.Commands, }, StandardClaims: jwt.StandardClaims{ ExpiresAt: time.Now().Add(time.Hour * 24).Unix(), diff --git a/types/storage.go b/types/storage.go index b52a308e..7de31b61 100644 --- a/types/storage.go +++ b/types/storage.go @@ -7,6 +7,8 @@ type Store struct { Share ShareStore } +// TODO: wrappers to verify + // UsersStore is used to manage users relativey to a data storage. type UsersStore interface { Get(id uint) (*User, error)