Merge pull request #9236 from owncloud/test/reva-4694

bump reva to fae5c105158f744
This commit is contained in:
Jörn Friedrich Dreyer
2024-05-23 12:51:40 +02:00
committed by GitHub
6 changed files with 16 additions and 5 deletions
+8
View File
@@ -106,6 +106,7 @@ func (r *Role) OCSPermissions() Permissions {
// M = Mounted
// Z = Deniable (NEW)
// P = Purge from trashbin
// X = SecureViewable
func (r *Role) WebDAVPermissions(isDir, isShared, isMountpoint, isPublic bool) string {
var b strings.Builder
if !isPublic && isShared {
@@ -141,6 +142,10 @@ func (r *Role) WebDAVPermissions(isDir, isShared, isMountpoint, isPublic bool) s
fmt.Fprintf(&b, "P")
}
if r.Name == RoleSecureViewer {
fmt.Fprintf(&b, "X")
}
return b.String()
}
@@ -541,6 +546,9 @@ func RoleFromResourcePermissions(rp *provider.ResourcePermissions, islink bool)
r.Name = RoleViewer
return r
}
} else if rp.Stat && rp.GetPath && rp.ListContainer && !rp.InitiateFileUpload && !rp.Delete && !rp.AddGrant {
r.Name = RoleSecureViewer
return r
}
if r.ocsPermissions == PermissionCreate {
if rp.GetPath && rp.InitiateFileDownload && rp.ListContainer && rp.Move {