Skip to content

sharing: make sure that we only find the shares from a given owner - #12084

Merged
MorrisJobke merged 1 commit into
masterfrom
sharing_fix_shared_with_info
Nov 24, 2014
Merged

MorrisJobke merged 1 commit into
masterfrom
sharing_fix_shared_with_info

Conversation

@schiessle

Copy link
Copy Markdown
Contributor

Make sure that we only find the shares from a given owner and don't expose shares from other users.

How to test:

  • create three user: user1, user2, user3, user4
  • user1 creates following folder structure: /folder/subfolder/subsubfolder
  • user1 shares folder to user2 and to user3
  • login as user2
  • user2 shares folder/subfolder to user4
  • user2 open share drop down for folder/subfolder/subsubfolder

Expected Result:
The drop down shows

Shared in subfolder with user4

Result before this patch:
The drop down shows

Shared in folder with user2, user3
Shared in subfolder with user4

@schiessle schiessle changed the title also check for the correct owner if it was submitted sharing: make sure that we only find the shares from a given owner Nov 10, 2014
@schiessle

Copy link
Copy Markdown
Contributor Author

reviewers needed... maybe @PVince81 @th3fallen @MorrisJobke ? Or someone else? Thanks a lot!

@PVince81 PVince81 added this to the 2014-sprint-08-current milestone Nov 17, 2014
@schiessle

Copy link
Copy Markdown
Contributor Author

Will also fix: #12106

Comment thread tests/lib/share/share.php Outdated

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.

Note: you can also use $this->assertEmpty() in the future 😄

@PVince81

Copy link
Copy Markdown
Contributor

Tested, works 👍

However, it does NOT fix #12106. For me when shared with "group" containing "user2", "user3" and "user4" the share dropdown on the subdir shows "Shared with false" for "user2", "user3", "user4", "group1". This probably needs a different fix.

@schiessle

Copy link
Copy Markdown
Contributor Author

However, it does NOT fix #12106. For me when shared with "group" containing "user2", "user3" and "user4" the share dropdown on the subdir shows "Shared with false" for "user2", "user3", "user4", "group1". This probably needs a different fix.

Right! I only checked the drop down for the recipients which was fixed with this PR. But the drop-down from the owner seems to be still broken. Will take care of it independent from this PR

@schiessle
schiessle force-pushed the sharing_fix_shared_with_info branch from 6203da9 to 636f60e Compare November 18, 2014 18:44
Comment thread apps/files_sharing/lib/share/folder.php Outdated

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.

invalid PHPDoc?

@schiessle
schiessle force-pushed the sharing_fix_shared_with_info branch from 636f60e to b924899 Compare November 21, 2014 14:54
@schiessle

Copy link
Copy Markdown
Contributor Author

@LukasReschke I fixed the phpdoc, maybe you want to have a final look? Thanks!

@LukasReschke

Copy link
Copy Markdown
Contributor

Sure. - With pleasure :-)

Comment thread apps/files_sharing/lib/share/folder.php Outdated

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.

strinf? ;-)

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.

damn... next try ;-)

@schiessle
schiessle force-pushed the sharing_fix_shared_with_info branch from b924899 to a7ebfe8 Compare November 21, 2014 15:19
@LukasReschke

Copy link
Copy Markdown
Contributor

Works - great fix 👍

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 2 new issues, 5 updated code elements

@MorrisJobke

Copy link
Copy Markdown
Contributor

@owncloud-bot retest this please

@ghost

ghost commented Nov 22, 2014

Copy link
Copy Markdown

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/3081/

Build result: FAILURE

[...truncated 18 lines...] > git rev-parse origin/pr/12084/merge^{commit} # timeout=10Checking out Revision b69c2fa6f4d398a75e21028fcbdc19d956be393c (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f b69c2fa6f4d398a75e21028fcbdc19d956be393c > git rev-list a3c84da313d38ecf77a1ce844a75d0dc14392e31 # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveCleaning workspace > git rev-parse --verify HEAD # timeout=10Resetting working tree > git reset --hard # timeout=10 > git clean -fdx # timeout=10 > git submodule foreach --recursive git reset --hard # timeout=10 > git submodule foreach --recursive git clean -fdx # timeout=10Triggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 8 second
💣 Test FAILed. 💣

@MorrisJobke

Copy link
Copy Markdown
Contributor

As Jenkins is broken on existing PRs I will resubmit this as a new PR to invoke the Jenkins test run.

@MorrisJobke

Copy link
Copy Markdown
Contributor

I will merge this if the test run in #12377 succeed.

@MorrisJobke

Copy link
Copy Markdown
Contributor

As the only change after @PVince81 was a PHPDoc and Jenkins pass in #12377 -> merge

MorrisJobke added a commit that referenced this pull request Nov 24, 2014
sharing: make sure that we only find the shares from a given owner
@MorrisJobke
MorrisJobke merged commit 8782b22 into master Nov 24, 2014
@MorrisJobke
MorrisJobke deleted the sharing_fix_shared_with_info branch November 24, 2014 10:44
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants