Skip to content

received shares must go into share_folder when configured#35312

Merged
karakayasemi merged 1 commit intomasterfrom
federated-share-folder
May 31, 2019
Merged

received shares must go into share_folder when configured#35312
karakayasemi merged 1 commit intomasterfrom
federated-share-folder

Conversation

@karakayasemi
Copy link
Copy Markdown
Contributor

@karakayasemi karakayasemi commented May 23, 2019

Description

Federates shares currently does not respect to configured share folder. This PR resolves this bug.

Related Issue

Motivation and Context

Resolving bug.

How Has This Been Tested?

Manually by following below steps:
Scenario 1

  • install two ownCloud instance
  • add 'share_folder' => 'test' to config.php's of first instance
  • share a file from second instance to first instance
  • accept the share from first instance
  • the file should be in test folder

Scenario 2

  • install two ownCloud instance
  • add second instance as a trusted server in first instance
  • configure auto-accepting federated shares from trusted servers in first instance
  • add 'share_folder' => 'test' to config.php's of first instance
  • share a file from second instance to first instance
  • the file should be in test folder

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:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@karakayasemi karakayasemi requested a review from VicDeo May 23, 2019 08:18
@karakayasemi karakayasemi self-assigned this May 23, 2019
@karakayasemi karakayasemi requested a review from cdamken May 23, 2019 08:20
@codecov
Copy link
Copy Markdown

codecov bot commented May 23, 2019

Codecov Report

Merging #35312 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35312      +/-   ##
============================================
+ Coverage     65.53%   65.56%   +0.03%     
  Complexity    18648    18648              
============================================
  Files          1218     1218              
  Lines         70548    70550       +2     
  Branches       1288     1288              
============================================
+ Hits          46235    46258      +23     
+ Misses        23936    23915      -21     
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.93% <100%> (+0.03%) 18648 <0> (ø) ⬇️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/External/Manager.php 89.63% <100%> (+13.09%) 32 <0> (ø) ⬇️

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 7684118...c9adc11. Read the comment docs.

@micbar micbar added this to the development milestone May 24, 2019
@karakayasemi karakayasemi force-pushed the federated-share-folder branch from bfd5855 to be27d8b Compare May 24, 2019 18:42
@karakayasemi karakayasemi requested a review from jvillafanez May 27, 2019 10:17
];

// Add a accepted share for "user"
\call_user_func_array([$this->manager, 'addShare'], $shareData1);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why the "call_user_func_array"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I followed syntax of the previous tests. I guess passing parameters as an array is easier.

@jvillafanez
Copy link
Copy Markdown
Member

did this feature work with federated shares? Maybe we should include an additional option to use a different folder for federated shares (pinging @pmaier1 for this).
We could have shared_folder => Shared and federated_shared_folder => Federated_Shared, or both keys could also be set up to use the same folder.

@karakayasemi
Copy link
Copy Markdown
Contributor Author

did this feature work with federated shares? Maybe we should include an additional option to use a different folder for federated shares (pinging @pmaier1 for this).
We could have shared_folder => Shared and federated_shared_folder => Federated_Shared, or both keys could also be set up to use the same folder.

There is an open issue for this feature and it was identified as bug. @pmaier1's thought is valuable for deciding whether separation of this configuration. I can modify the PR after decision.

@karakayasemi karakayasemi force-pushed the federated-share-folder branch from be27d8b to c9adc11 Compare May 28, 2019 05:37
@pmaier1
Copy link
Copy Markdown
Contributor

pmaier1 commented May 31, 2019

I don't see a reason to split these folders. Why would you?

Generally speaking, federated sharing should be as transparent as possible to users (many users don't understand the concept), meaning for a regular user it should not make a difference whether a share is local or federated.

@micbar micbar requested a review from jvillafanez May 31, 2019 13:48
Copy link
Copy Markdown
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

Tested in DamkenCloud. 👍

@micbar
Copy link
Copy Markdown
Contributor

micbar commented May 31, 2019

@karakayasemi please merge and backport.

@karakayasemi
Copy link
Copy Markdown
Contributor Author

Backport PR: #35396

Copy link
Copy Markdown
Contributor

@cdamken cdamken left a comment

Choose a reason for hiding this comment

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

now the share comes in the "/Shared" folder as desired.

But

in "Share with you" still doesn't appear the shares.

@karakayasemi
Copy link
Copy Markdown
Contributor Author

Hmm, in the related issue description, I could not see anything about "Shared with you" problem. @cdamken we may raise a new ticket for it.

@cdamken
Copy link
Copy Markdown
Contributor

cdamken commented May 31, 2019

Your are right, it was not described above, I just notice it now

we can create a new ticket for that

Thanks! 😄

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.

[10.0.7] Federated shares doesn't appear in the /Shared folder

5 participants