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

Add function to remove share invite using root endpoint #227

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

amrita-shrestha
Copy link
Contributor

@amrita-shrestha amrita-shrestha commented Jul 2, 2024

This PR refactor delete function of Share to work on both permission and root endpoint.

In this PR, ResourceShare has been introduced. Share class is parent class for DriveShare and ResourceShare. ResourceShare will be parent class for ShareLink, ShareCreated.

  • added tests for deleting drive share on ocis version > 6.0.0. Test has been skipped for ocis version < 6.0.0

Part of

@amrita-shrestha amrita-shrestha self-assigned this Jul 2, 2024
@S-Panta S-Panta force-pushed the add-share-invite-using-root-endpoint branch 4 times, most recently from 23cffe4 to 36c98c1 Compare July 3, 2024 09:44
@amrita-shrestha amrita-shrestha force-pushed the add-share-invite-using-root-endpoint branch 6 times, most recently from e83bed1 to 1958911 Compare July 9, 2024 05:14
Base automatically changed from add-share-invite-using-root-endpoint to main July 9, 2024 06:26
@amrita-shrestha amrita-shrestha force-pushed the add-delete-share-invite-from-drive branch from b50f27c to 13ded81 Compare July 9, 2024 08:47
@amrita-shrestha amrita-shrestha force-pushed the add-delete-share-invite-from-drive branch from 13ded81 to 56af5dc Compare July 9, 2024 08:53
@amrita-shrestha amrita-shrestha marked this pull request as ready for review July 9, 2024 09:24
$managerRole = null;

if (getenv('OCIS_VERSION') === "stable") {
$this->markTestSkipped('Ocis version < 6.0.0 does not support creation of drive share invite so delete drive share test has been skipped');
Copy link
Contributor

Choose a reason for hiding this comment

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

This is correct. It is difficult, or "impossible", to test what happens in ocis V5 if someone tries to delete a drive share, because it is not possible to create a drive share in the first place.

Someone could try to delete a "bogus" drive share, putting some non-existent id. But that would be the same as any "completely wrong" attempt to use the non-existent end-point, and that is already covered by ocis tests.

Copy link

sonarcloud bot commented Jul 10, 2024

@phil-davis phil-davis merged commit de71f51 into main Jul 10, 2024
2 checks passed
@phil-davis phil-davis deleted the add-delete-share-invite-from-drive branch July 10, 2024 06:52
ownclouders pushed a commit that referenced this pull request Jul 10, 2024
Add function to remove share invite using root endpoint
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