user: add a field to indicate whether the password is set

A structure similar to the one used for secrets would be better,
but we don't want to break backwards compatibility.

Also document that omitting the password field in the request body
will preserve the current password when updating a user using the
REST API. Added a test case for this.

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-04-06 18:22:09 +02:00
parent 74f05e5305
commit 184b99d500
25 changed files with 192 additions and 77 deletions

View File

@@ -45,6 +45,11 @@ const (
azBlobFsName = "AzureBlobFs"
)
// Additional checks for files
const (
CheckParentDir = 1
)
var (
validAzAccessTier = []string{"", "Archive", "Hot", "Cool"}
// ErrStorageSizeUnavailable is returned if the storage backend does not support getting the size
@@ -89,7 +94,7 @@ type Fs interface {
Stat(name string) (os.FileInfo, error)
Lstat(name string) (os.FileInfo, error)
Open(name string, offset int64) (File, *pipeat.PipeReaderAt, func(), error)
Create(name string, flag int) (File, *PipeWriter, func(), error)
Create(name string, flag, checks int) (File, *PipeWriter, func(), error)
Rename(source, target string) (int, int64, error)
Remove(name string, isDir bool) error
Mkdir(name string) error