mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
add copy permission
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -135,6 +135,7 @@ type filesPage struct {
|
||||
CanDelete bool
|
||||
CanDownload bool
|
||||
CanShare bool
|
||||
CanCopy bool
|
||||
ShareUploadBaseURL string
|
||||
Error *util.I18nError
|
||||
Paths []dirMapping
|
||||
@@ -755,6 +756,7 @@ func (s *httpdServer) renderSharedFilesPage(w http.ResponseWriter, r *http.Reque
|
||||
CanDelete: false,
|
||||
CanDownload: share.Scope != dataprovider.ShareScopeWrite,
|
||||
CanShare: false,
|
||||
CanCopy: false,
|
||||
Paths: getDirMapping(dirName, currentURL),
|
||||
QuotaUsage: newUserQuotaUsage(&dataprovider.User{}),
|
||||
}
|
||||
@@ -797,6 +799,7 @@ func (s *httpdServer) renderFilesPage(w http.ResponseWriter, r *http.Request, di
|
||||
CanDelete: user.CanDeleteFromWeb(dirName),
|
||||
CanDownload: user.HasPerm(dataprovider.PermDownload, dirName),
|
||||
CanShare: user.CanManageShares(),
|
||||
CanCopy: user.CanCopyFromWeb(dirName, dirName),
|
||||
ShareUploadBaseURL: "",
|
||||
Paths: getDirMapping(dirName, webClientFilesPath),
|
||||
QuotaUsage: newUserQuotaUsage(user),
|
||||
|
||||
Reference in New Issue
Block a user