Skip to content

Commit

Permalink
Merge pull request #4013 from micbar/wedav-perm-purge
Browse files Browse the repository at this point in the history
Add WebDAV permission for PurgeRecyle
  • Loading branch information
micbar authored Jun 30, 2023
2 parents 6101e07 + 9a55207 commit 4d867d5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .drone.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The test runner source for API tests
APITESTS_COMMITID=c8f8bc55e22597bc3d53b63b2f38f345b4814b07
APITESTS_COMMITID=8fe0310f7eb2f689156710c3c3e37a3758322cea
APITESTS_BRANCH=master
APITESTS_REPO_GIT_URL=https://github.com/owncloud/ocis.git
5 changes: 5 additions & 0 deletions changelog/unreleased/add-new-webdav-permission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add new WebDAV permissions

We added the permission "PurgeRecycle" to the WebDAV permissions list. I is represented by the capital letter `P`.

https://github.com/cs3org/reva/pull/4013
5 changes: 5 additions & 0 deletions internal/http/services/owncloud/ocs/conversions/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (r *Role) OCSPermissions() Permissions {
// R = Shareable
// M = Mounted
// Z = Deniable (NEW)
// P = Purge from trashbin
func (r *Role) WebDAVPermissions(isDir, isShared, isMountpoint, isPublic bool) string {
var b strings.Builder
if !isPublic && isShared {
Expand Down Expand Up @@ -129,6 +130,10 @@ func (r *Role) WebDAVPermissions(isDir, isShared, isMountpoint, isPublic bool) s
fmt.Fprintf(&b, "Z")
}

if r.CS3ResourcePermissions().PurgeRecycle {
fmt.Fprintf(&b, "P")
}

return b.String()
}

Expand Down

0 comments on commit 4d867d5

Please sign in to comment.