-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add secure view share role #4643
Conversation
Adds a new share role "Secure view". This role only allows viewing resources, no downloading, editing or deleting.
@JammingBen Thanks for your first contribution to reva 🎉 Although, i wonder why we need that in reva. IMHO we need that in the ocis graph package. |
@micbar Current every role defined in graph (https://github.com/owncloud/ocis/blob/master/services/graph/pkg/unifiedrole/unifiedrole.go) maps to a reva role. Why would it be different for the SecureView role? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. From my POV we should work with these permissions now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Just question about naming
pkg/conversions/role.go
Outdated
@@ -52,6 +52,8 @@ const ( | |||
RoleUploader = "uploader" | |||
// RoleManager grants manager permissions on a resource. Semantically equivalent to co-owner. | |||
RoleManager = "manager" | |||
// RoleSecureView grants secure view permissions on a resource or space. | |||
RoleSecureView = "secure-view" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about this naming? I mean "viewer"
, "editor"
, "uploader"
, "manager"
, ... Shouldn't this be something like "secure-viewer"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I'll adjust the naming 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
feat: add secure view share role
Adds a new share role "Secure view". This role only allows viewing resources, no downloading, editing or deleting.
I'm not 100% sure how the exact permissions will end up looking once this role has been refined (see owncloud/ocis#8855), but it's a placeholder to get started.