mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
user: add a permission to disable changing api key authentication
also implement the missing APIs to enable/disable api key authentication
This commit is contained in:
@@ -28,6 +28,10 @@ type pwdChange struct {
|
||||
NewPassword string `json:"new_password"`
|
||||
}
|
||||
|
||||
type apiKeyAuth struct {
|
||||
AllowAPIKeyAuth bool `json:"allow_api_key_auth"`
|
||||
}
|
||||
|
||||
func sendAPIResponse(w http.ResponseWriter, r *http.Request, err error, message string, code int) {
|
||||
var errorString string
|
||||
if _, ok := err.(*util.RecordNotFoundError); ok {
|
||||
|
||||
Reference in New Issue
Block a user