feat: refine minimal line icon file UI
This commit is contained in:
@@ -359,7 +359,7 @@ func (s *Server) transfer(w http.ResponseWriter, r *http.Request, copyOnly bool)
|
||||
writeJSONError(w, http.StatusBadRequest, "invalid parameter")
|
||||
return
|
||||
}
|
||||
if !a.MaskFor(src).HasRead() || !a.MaskFor(dst).HasWrite() || !a.MaskFor(path.Dir(dst)).HasWrite() {
|
||||
if !a.MaskFor(src).HasRead() || (!copyOnly && !a.MaskFor(src).HasDelete()) || !a.MaskFor(dst).HasWrite() || !a.MaskFor(path.Dir(dst)).HasWrite() {
|
||||
writeJSONError(w, http.StatusForbidden, "has no privilege")
|
||||
return
|
||||
}
|
||||
@@ -384,6 +384,12 @@ func (s *Server) transfer(w http.ResponseWriter, r *http.Request, copyOnly bool)
|
||||
writeJSONError(w, http.StatusForbidden, err.Error())
|
||||
return
|
||||
}
|
||||
if !copyOnly {
|
||||
if err = checkDeleteTree(s.Store, a, src); err != nil {
|
||||
writeJSONError(w, http.StatusForbidden, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if copyOnly {
|
||||
err = s.Store.Copy(src, dst)
|
||||
|
||||
Reference in New Issue
Block a user