Skip to content

Commit

Permalink
Fix share permission on a file in sql (cbox pkg) share driver (#2231)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 authored Nov 3, 2021
1 parent 0286916 commit a21af87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog/unreleased/fix-cbox-write-permission-single-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: Fix share permission on a single file in sql share driver (cbox pkg)

https://github.com/cs3org/reva/pull/2231
4 changes: 2 additions & 2 deletions pkg/cbox/utils/conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ func ResourceTypeToItem(r provider.ResourceType) string {
// SharePermToInt maps read/write permissions to an integer
func SharePermToInt(p *provider.ResourcePermissions) int {
var perm int
if p.CreateContainer {
if p.CreateContainer || p.InitiateFileUpload {
perm = 15
} else if p.ListContainer {
} else if p.ListContainer || p.InitiateFileDownload {
perm = 1
}
// TODO map denials and resharing; currently, denials are mapped to 0
Expand Down

0 comments on commit a21af87

Please sign in to comment.