Skip to content
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

The libregraph public link type representation added to the PROPFIND response #4722

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from

Conversation

2403905
Copy link

@2403905 2403905 commented Jun 11, 2024

The libregraph public link type representation added to the PROPFIND response
Related issue #8740

@2403905 2403905 requested review from labkode, a team and glpatcern as code owners June 11, 2024 15:13
// EDIT SharingLinkType = "edit"
// CREATE_ONLY SharingLinkType = "createOnly"
func (r *Role) OCSPermissionsToPublicLinkType(rt provider.ResourceType) string {
p := r.OCSPermissions()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I don't think we should converting this based on the OCS permissions here. OCS is going to go a away at some point (and r.OCSPermissions() will hopefully go with it. IMO we should do the conversion based on the CS3ResourcePermissions.

In ocis (https://github.com/owncloud/ocis/blob/fc2318a5ef419c559a46fad41fbc22f6211f50ec/services/graph/pkg/linktype/linktype.go#L33) we already have function for converting ResourcePermissions to libregraph link types. Maybe we should move that into reva to make it reusable in graph and reva?

BTW, libregraph also defines a blocksDownload type. Do need that here as well?

Copy link
Author

@2403905 2403905 Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an obvious solution but it will lead to coping more code. Since LinkType is similar to UnifiedRoleDefinition and UnifiedRoleDefinition was moved from reva to graph, it seems to me there is no point in bringing back LinkType to reva. https://github.com/cs3org/reva/pull/4268/files

The blocksDownload is not used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhafer We could try to move the Link permission sets to the reva/pkg/convertions and keep the LinkType in a graph. Then we can use those sets for the permission conversations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@micbar Could we separate the LinkType and move the permission sets provider.ResourcePermissions from the graph to the reva/pkg/conversions that allows converting based on the OCS permissions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In would suggest the opposite. Move the ocdav service to ocis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants