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

[stable10] Backport of Fix the share permissions evaluation #34473

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

sharidas
Copy link
Contributor

@sharidas sharidas commented Feb 13, 2019

When user tries to access "Shared with you"
to know the list of files/folders shared with
the user, the share tab for the files or folder
are having an issue. When the group(s) to which
the user belong is excluded from sharing, the
share options appear in the tab. This change
tries to fix the issue.

Signed-off-by: Sujith H sharidasan@owncloud.com

Description

Share a folder/file to create guest user. And then enable can share. After this try to login to the guest user. Enable Exclude groups from sharing and add guest_app in the text box. The guest users Shared with you would show the the share side bar. The panel will show auto complete. This is the problem. And this change set tries to avoid the same. When group guest_app is added to be excluded, the resharing should be blocked for the users of guest_app, even if can share is checked ( as explained above).

Related Issue

  • Fixes <issue_link>

Motivation and Context

The Shared with you section should not show the share side bar if guest_app group is added to the Exclude groups from sharing and can share enabled in the file/folder shared to the guest user ( while creating guest user).

How Has This Been Tested?

  • Create guest user by sharing a file/folder
  • Enable can share to the shared file/folder
  • Login to the guest user
  • Now add guest_app to the Exclude groups from sharing in the sharing page ( in admin settings )
  • Navigate to guest users Shared with you
  • Before applying the patch
    before_patching
  • After applying the patch
    after_patching1

Screenshots (if appropriate):

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)

@sharidas sharidas self-assigned this Feb 13, 2019
@sharidas sharidas added this to the development milestone Feb 13, 2019
When user tries to access "Shared with you"
to know the list of files/folders shared with
the user, the share tab for the files or folder
are having an issue. When the group(s) to which
the user belong is excluded from sharing, the
share options appear in the tab. This change
tries to fix the issue.

Signed-off-by: Sujith H <sharidasan@owncloud.com>
@sharidas sharidas force-pushed the fix-sharepermission-stable10 branch from fbc5b08 to cb418e4 Compare February 13, 2019 07:49
@codecov
Copy link

codecov bot commented Feb 13, 2019

Codecov Report

Merging #34473 into stable10 will decrease coverage by 18.37%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             stable10   #34473       +/-   ##
===============================================
- Coverage       63.57%    45.2%   -18.38%     
===============================================
  Files            1265      116     -1149     
  Lines           75314    11482    -63832     
  Branches         1291     1291               
===============================================
- Hits            47884     5190    -42694     
+ Misses          27050     5912    -21138     
  Partials          380      380
Flag Coverage Δ Complexity Δ
#javascript 53.32% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 31.02% <ø> (-33.66%) 0 <ø> (-19146)
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Storage/DAV.php 59.45% <0%> (-21.64%) 0% <0%> (ø)
apps/updatenotification/templates/admin.php
lib/private/Encryption/Keys/Storage.php
lib/private/App/CodeChecker/NodeVisitor.php
lib/private/RedisFactory.php
apps/dav/lib/Avatars/AvatarNode.php
...s/dav/appinfo/Migrations/Version20170202213905.php
apps/dav/lib/Upload/ChunkLocationProvider.php
apps/files/lib/AppInfo/Application.php
apps/systemtags/list.php
... and 1140 more

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 3f1c2c3...cb418e4. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 13, 2019

Codecov Report

Merging #34473 into stable10 will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #34473      +/-   ##
==============================================
+ Coverage       63.57%   63.58%   +<.01%     
- Complexity      19146    19147       +1     
==============================================
  Files            1265     1265              
  Lines           75314    75317       +3     
  Branches         1291     1291              
==============================================
+ Hits            47884    47887       +3     
  Misses          27050    27050              
  Partials          380      380
Flag Coverage Δ Complexity Δ
#javascript 53.32% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 64.68% <100%> (ø) 19147 <0> (+1) ⬆️
Impacted Files Coverage Δ Complexity Δ
apps/files_sharing/lib/API/Share20OCS.php 93.46% <100%> (+0.04%) 184 <0> (+1) ⬆️

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 3f1c2c3...cb418e4. Read the comment docs.

@sharidas
Copy link
Contributor Author

Original PR: #34250

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@PVince81
Copy link
Contributor

wait: 2 - developing ? is anything missing ? @sharidas

@sharidas
Copy link
Contributor Author

wait: 2 - developing ? is anything missing ? @sharidas

😢 Nah. It was a mistake to have the labelled wrongly. Nothing is missing here. I have copied the code, and not cherry-picked. Because while creating this PR, the original PR was not merged.

@PVince81 PVince81 merged commit 3844331 into stable10 Feb 13, 2019
@PVince81 PVince81 deleted the fix-sharepermission-stable10 branch February 13, 2019 13:12
@PVince81 PVince81 modified the milestones: development, QA Apr 12, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 15, 2020
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.

2 participants