Skip to content

Skip share_folder for guest users #40864

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

Merged
merged 6 commits into from
Jul 10, 2023
Merged

Conversation

pako81
Copy link

@pako81 pako81 commented Jul 10, 2023

Description

In #40378 we've fixed the case of (not) moving the share target when the backend storage becomes temporary unavailable but we have now the collateral effect that guests do not see anymore their received shares as we are now forcing the creation of the target which will obviously fail for them as storage is read-only.

We now skip the share_folder config.php option for guests and default to root.

Related issue

https://github.com/owncloud/enterprise/issues/5842

How Has This Been Tested?

  • manually by setting the above mentioned config.php option and verifying that guests can see their received shares at the root 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
  • Changelog item

@pako81 pako81 added this to the development milestone Jul 10, 2023
@pako81 pako81 self-assigned this Jul 10, 2023
@pako81 pako81 requested review from jvillafanez and IljaN July 10, 2023 07:59
@jvillafanez
Copy link
Member

Guest check should be the first thing to do. No need to get the "share_folder" config option for guests because we'll always return "/" for them regardless of the configuration.

We probably should add some info in the "config.sample.php" file

@pako81
Copy link
Author

pako81 commented Jul 10, 2023

Applied suggestions.

Copy link
Member

@jvillafanez jvillafanez left a comment

Choose a reason for hiding this comment

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

Tiny change and we're done

@mmattel
Copy link
Contributor

mmattel commented Jul 10, 2023

Just hooking myself in to see when merged to start a CTD run.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

80.0% 80.0% Coverage
0.0% 0.0% Duplication

@pako81 pako81 merged commit 8492156 into master Jul 10, 2023
@delete-merged-branch delete-merged-branch bot deleted the skip_share_folder_for_guest_users branch July 10, 2023 10:39
@owncloud owncloud deleted a comment from update-docs bot Jul 10, 2023
@phil-davis
Copy link
Contributor

Works - I added a test scenario in guests PR owncloud/guests#595
It fails without this code fix, and passes with this fix - good.
I will sort out getting it merged to the guests repo tomorrow.

shokri-navid pushed a commit to pondersource/core that referenced this pull request Jul 16, 2023
* skip share_folder for guest users

* add changelog

* appy suggestions

* update config.sample.php

* fix return

* just return root
@Salipa-Gurung
Copy link

Salipa-Gurung commented Aug 16, 2023

Tested with:
Client: ownCloud 4.2.0.11670 f5a29b

  • guest can use the client ✔️
  • guest can see their received shares at the root folder and can upload resources in it ✔️
Screenshot from 2023-08-16 17-00-22 Screenshot from 2023-08-16 17-00-38

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.

5 participants