bump reva to fae5c105158f744

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2024-05-23 10:39:57 +02:00
parent 228eb68245
commit c2fa800491
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 {