mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
user API: allow to disable writes ...
... even if the user has permissions for these actions
This commit is contained in:
@@ -632,13 +632,13 @@ func (s *httpdServer) initializeRouter() {
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientPubKeyChangeDisabled)).Get(userPublicKeysPath, getUserPublicKeys)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientPubKeyChangeDisabled)).Put(userPublicKeysPath, setUserPublicKeys)
|
||||
router.Get(userFolderPath, readUserFolder)
|
||||
router.Post(userFolderPath, createUserDir)
|
||||
router.Patch(userFolderPath, renameUserDir)
|
||||
router.Delete(userFolderPath, deleteUserDir)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Post(userFolderPath, createUserDir)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Patch(userFolderPath, renameUserDir)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Delete(userFolderPath, deleteUserDir)
|
||||
router.Get(userFilePath, getUserFile)
|
||||
router.Post(userFilePath, uploadUserFiles)
|
||||
router.Patch(userFilePath, renameUserFile)
|
||||
router.Delete(userFilePath, deleteUserFile)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Post(userFilePath, uploadUserFiles)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Patch(userFilePath, renameUserFile)
|
||||
router.With(checkHTTPUserPerm(sdk.WebClientWriteDisabled)).Delete(userFilePath, deleteUserFile)
|
||||
router.Post(userStreamZipPath, getUserFilesAsZipStream)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user