Skip to content

Commit a21af87

Browse files
authored
Fix share permission on a file in sql (cbox pkg) share driver (#2231)
1 parent 0286916 commit a21af87

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Bugfix: Fix share permission on a single file in sql share driver (cbox pkg)
2+
3+
https://github.com/cs3org/reva/pull/2231

pkg/cbox/utils/conversions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ func ResourceTypeToItem(r provider.ResourceType) string {
101101
// SharePermToInt maps read/write permissions to an integer
102102
func SharePermToInt(p *provider.ResourcePermissions) int {
103103
var perm int
104-
if p.CreateContainer {
104+
if p.CreateContainer || p.InitiateFileUpload {
105105
perm = 15
106-
} else if p.ListContainer {
106+
} else if p.ListContainer || p.InitiateFileDownload {
107107
perm = 1
108108
}
109109
// TODO map denials and resharing; currently, denials are mapped to 0

0 commit comments

Comments
 (0)