Skip to content

graph/sharing: Add check for role conditions - #8247

Merged
rhafer merged 4 commits into
owncloud:masterfrom
rhafer:issue/8131
Jan 24, 2024
Merged

rhafer merged 4 commits into
owncloud:masterfrom
rhafer:issue/8131

Conversation

@rhafer

@rhafer rhafer commented Jan 18, 2024

Copy link
Copy Markdown
Contributor

Use the condition from the unifiedrole to check if the requested role is actually applicable to the selected resource.

@rhafer rhafer self-assigned this Jan 18, 2024
@update-docs

update-docs Bot commented Jan 18, 2024

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 commented Jan 18, 2024 •

Copy link
Copy Markdown
Contributor Author

Keep this is draft as we need to bump reva for getting the other part of the fix: cs3org/reva#4462

Also, I am still trying to address the FIXME part about sharing space root (which requires the Owner condition)

@rhafer
rhafer force-pushed the issue/8131 branch 2 times, most recently from 920c6f6 to da31038 Compare January 22, 2024 15:12
@micbar micbar mentioned this pull request Jan 22, 2024
@rhafer
rhafer force-pushed the issue/8131 branch 2 times, most recently from 3bc99ad to 26e7dc6 Compare January 23, 2024 16:52
@rhafer
rhafer marked this pull request as ready for review January 23, 2024 16:53
@rhafer
rhafer requested a review from fschade January 23, 2024 16:53
Co-Owner and Manager are space specific roles. They need the UnifiedRoleConditionOwner.
Use the condition from the unifiedrole to check if the requested role
is actually applicable to the selected resource.

Fixes: owncloud#8131
Don't try to assign space specific roles to file or directory shares in
positive tests. The API now forbids those correctly. We might want
to add negative tests for that.
When computing the allowed roles for a spaceroot use the correct conditions.
Spaceroots require '@Subject.objectId Any_of @Resource.owners'.

Note: Updating or deleting the permissions on a spaceroot via
'v1beta1/drives/{driveid}/items/{itemid}/permissions/{permissionid}' does still
not work.
@sonarqubecloud

Copy link
Copy Markdown

@micbar micbar 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.

LGTM

@rhafer
rhafer merged commit da495fd into owncloud:master Jan 24, 2024
@rhafer
rhafer deleted the issue/8131 branch January 25, 2024 11:05
@micbar micbar mentioned this pull request Jan 26, 2024
67 of 71 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.

2 participants