[cbox-commit-1] Expose capability to deny access in OCS API#3064
[cbox-commit-1] Expose capability to deny access in OCS API#3064labkode wants to merge 1 commit into
Conversation
| PermissionAll Permissions = (1 << (iota - 1)) - 1 | ||
| PermissionAll = PermissionMax - PermissionNone | ||
| // PermissionMin is to be used within value range checks | ||
| PermissionMin = PermissionRead |
There was a problem hiding this comment.
We should not change the bitmask. We should use roles instead. The permissions bitmask is considered deprecated and will not work in spaces.
There was a problem hiding this comment.
That's fine, this PR is not expected to work with spaces, only for the master branch.
There was a problem hiding this comment.
Ok but the testsuite will never pass on this. The permissions bitmask ends with 31 everything above that will be considered as "invalid permission"
There was a problem hiding this comment.
Yeah we found that earlier, I think we will add those tests in the expected failures files for time being as this will (are) fixed in the edge branch.
| // This filter type is used to filter out "denial shares". These are currently implemented by having the permission "0". | ||
| // I.e. if the permission is 0 we don't want to show it. | ||
| return int(conversions.RoleFromResourcePermissions(share.Permissions.Permissions).OCSPermissions()) != 0 | ||
| return share.Permissions.Permissions.DenyGrant |
There was a problem hiding this comment.
You should use permissionsNone here because you want to filter out the denials not the DenyGrant
No description provided.