Skip to content

graph: Set roles/actions in sharedByMe response - #7703

Merged
fschade merged 5 commits into
owncloud:masterfrom
rhafer:graph-sharedbyme
Nov 17, 2023
Merged

fschade merged 5 commits into
owncloud:masterfrom
rhafer:graph-sharedbyme

Conversation

@rhafer

@rhafer rhafer commented Nov 9, 2023 •

Copy link
Copy Markdown
Contributor

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
@update-docs

update-docs Bot commented Nov 9, 2023

Copy link
Copy Markdown

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

rhafer commented Nov 14, 2023

Copy link
Copy Markdown
Contributor Author

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 requested review from fschade and micbar November 14, 2023 11:10
@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

rhafer commented Nov 17, 2023

Copy link
Copy Markdown
Contributor Author

rebased

@sonarqubecloud

Copy link
Copy Markdown

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

@fschade fschade left a comment

Copy link
Copy Markdown
Contributor

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
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 done
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