✨ Handle readonly access

This commit is contained in:
2020-10-18 11:29:07 +02:00
parent 47a708de0e
commit 3d5976f3c3
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -82,10 +82,11 @@ func (cmd *CmdServe) Run(app *app) error {
return
}
// TODO determine permissions
readonly := share.ReadOnly || share.Role == ShareRoleReader
directoryMapping := DirectoryMapping{
DataDirName: share.UUID.String(),
ReadOnly: readonly,
}
// Use the WebDAV handler to actually serve the request. Also enhance the context