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

Make sure that either owner or initiator of federated share is not lo… #37534

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

VicDeo
Copy link
Member

@VicDeo VicDeo commented Jun 15, 2020

…cal user

Description

Do not send update to remote for local users

Motivation and Context

The user who received a local share and reshared it via federation can't unshare it -
The share is removed for the remote recipient but there is a stray entry in oc_share left locally

How Has This Been Tested?

  • As user A share a file with user B locally
  • As user B reshare this file with user C@remote (federated)
  • As user B

Case 1 - As user B try to update permissions for C@remote

Expected

  1. permissions are updated for C@remote
  2. no errors for user B

Actual

  1. ✔️ permissions are updated for C@remote
  2. there is a "Invalid Federated Cloud ID" popup in UI for user B

Case 2 - As user B try to revoke access for C@remote

Expected

  1. C@remote can't access the share
  2. No error for user B
  3. user B can't see that the file is shared with C@remote any more

Actual

  1. ✔️ C@remote can't access the share
  2. there is a "Invalid Federated Cloud ID" popup in UI for user B
  3. user B still sees the file as shared with C@remote

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@VicDeo VicDeo added this to the development milestone Jun 15, 2020
@VicDeo VicDeo self-assigned this Jun 15, 2020
@update-docs
Copy link

update-docs bot commented Jun 15, 2020

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.

@VicDeo VicDeo force-pushed the bugfix/e3983 branch 3 times, most recently from 40198c6 to cbb75ce Compare June 16, 2020 11:06
@codecov
Copy link

codecov bot commented Jun 16, 2020

Codecov Report

Merging #37534 into master will increase coverage by 0.00%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #37534   +/-   ##
=========================================
  Coverage     64.67%   64.68%           
- Complexity    19339    19342    +3     
=========================================
  Files          1279     1279           
  Lines         75573    75577    +4     
  Branches       1331     1331           
=========================================
+ Hits          48880    48885    +5     
+ Misses        26301    26300    -1     
  Partials        392      392           
Flag Coverage Δ Complexity Δ
#javascript 54.14% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.84% <71.42%> (+<0.01%) 19342.00 <3.00> (+3.00)
Impacted Files Coverage Δ Complexity Δ
...ederatedfilesharing/lib/FederatedShareProvider.php 63.36% <71.42%> (+0.52%) 94.00 <3.00> (+3.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2aca8a4...1972cd0. Read the comment docs.

@VicDeo
Copy link
Member Author

VicDeo commented Jun 16, 2020

@pako81 FYI

@VicDeo VicDeo merged commit 66b8373 into master Jun 17, 2020
@delete-merged-branch delete-merged-branch bot deleted the bugfix/e3983 branch June 17, 2020 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants