user API: allow to disable writes ...

... even if the user has permissions for these actions
This commit is contained in:
Nicola Murino
2021-07-23 21:41:02 +02:00
parent 85a47810ff
commit 83c7453957
7 changed files with 97 additions and 13 deletions

View File

@@ -6,14 +6,15 @@ import (
"github.com/drakkan/sftpgo/v2/util"
)
// Web Client restrictions
// Web Client/user REST API restrictions
const (
WebClientPubKeyChangeDisabled = "publickey-change-disabled"
WebClientWriteDisabled = "write-disabled"
)
var (
// WebClientOptions defines the available options for the web client interface
WebClientOptions = []string{WebClientPubKeyChangeDisabled}
// WebClientOptions defines the available options for the web client interface/user REST API
WebClientOptions = []string{WebClientPubKeyChangeDisabled, WebClientWriteDisabled}
)
// TLSUsername defines the TLS certificate attribute to use as username