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

graph: Set roles/actions in sharedByMe response #7703

Merged
merged 5 commits into from
Nov 17, 2023

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Nov 9, 2023

Try to map CS3 resource permissions on a share to one of the default libregraph
UnifiedRoleDefinitions. If a match if found return the roleid in 'permissions.roles'
attribute of the response. If no match if found convert the
ResourcePermissions in to libre.graph.permissions.actions and return
those in the response.

@rhafer rhafer self-assigned this Nov 9, 2023
Copy link

update-docs bot commented Nov 9, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer rhafer force-pushed the graph-sharedbyme branch 2 times, most recently from d8da8df to 3f797fc Compare November 14, 2023 10:56
@rhafer rhafer marked this pull request as ready for review November 14, 2023 11:01
@rhafer
Copy link
Contributor Author

rhafer commented Nov 14, 2023

There is still a issue that cause the Editor role, when set via ocs on a file (not on a folder) to not be correctly mapped back to the FileEditor unifiedrole. Some part of the fix needs to happen in reva (I am currently working on that). I don't think we need to hold this back for the fix though.

@rhafer rhafer force-pushed the graph-sharedbyme branch 2 times, most recently from 33f5d91 to a1f7d14 Compare November 14, 2023 11:34
Add function to convert CS3ResourcePermsissions to libregraph actions
The "Self/Owner/Grantee" string are not part the the constraint value
rename it to GetBuiltinRoleDefinitionList and make it public
Try to map CS3 resource permissions on a share to one of the default libregraph
UnifiedRoleDefinitions. If a match if found return the roleid in 'permissions.roles'
attribute of the response. If no match if found convert the
ResourcePermissions in to `libre.graph.permissions.actions` and return
those in the response.
@rhafer
Copy link
Contributor Author

rhafer commented Nov 17, 2023

rebased

Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

91.8% 91.8% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@fschade fschade left a comment

Choose a reason for hiding this comment

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

🎸

@fschade fschade merged commit 9303cde into owncloud:master Nov 17, 2023
2 checks passed
ownclouders pushed a commit that referenced this pull request Nov 17, 2023
* unifiedrole: Add CS3ResourcePermissionsToLibregraphActions

Add function to convert CS3ResourcePermsissions to libregraph actions

* unifiedrole: Fix strings for the UnifiedRoleConditionSelf

The "Self/Owner/Grantee" string are not part the the constraint value

* graph: Move getRoleDefinitionList to unifiedrole module

rename it to GetBuiltinRoleDefinitionList and make it public

* graph: turn libregraph resource actions into string constants

* graph/sharedbyme: Set the correct roles (or actions) on permissions

Try to map CS3 resource permissions on a share to one of the default libregraph
UnifiedRoleDefinitions. If a match if found return the roleid in 'permissions.roles'
attribute of the response. If no match if found convert the
ResourcePermissions in to `libre.graph.permissions.actions` and return
those in the response.
@micbar micbar mentioned this pull request Nov 17, 2023
22 tasks
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