Skip to content

Refactor: Centralize logic for checking if a share is password protected - #61946

Merged
AndyScherzinger merged 1 commit into
nextcloud:masterfrom
theCalcaholic:feature/refactor-share-is-pw-protected
Jul 17, 2026
Merged

Refactor: Centralize logic for checking if a share is password protected#61946
AndyScherzinger merged 1 commit into
nextcloud:masterfrom
theCalcaholic:feature/refactor-share-is-pw-protected

Conversation

@theCalcaholic

@theCalcaholic theCalcaholic commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Previously, there were numerous checks that check whether a share has an empty or null password scattered around the code base. This PR moves the logic for this into a single, central method on IShare.

This PR prepares and is a prerequisite for #61722.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@theCalcaholic
theCalcaholic requested a review from a team as a code owner July 9, 2026 14:55
@theCalcaholic
theCalcaholic requested review from come-nc, leftybournes, provokateurin and salmart-dev and removed request for a team July 9, 2026 14:55
@theCalcaholic

Copy link
Copy Markdown
Contributor Author

@miaulalala This is the refactoring portion we were talking about.
From my perspective it is ready for review. :)

@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch 2 times, most recently from f019b17 to 85cac33 Compare July 9, 2026 15:17
@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch from 85cac33 to 16711c3 Compare July 13, 2026 09:39
@theCalcaholic

Copy link
Copy Markdown
Contributor Author

@come-nc Thanks for the review! I just force-pushed due to the missing signature.

@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch from 16711c3 to cd69517 Compare July 13, 2026 22:26
@CarlSchwan
CarlSchwan enabled auto-merge July 14, 2026 10:59
auto-merge was automatically disabled July 14, 2026 11:17

Head branch was pushed to by a user without write access

@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch from cd69517 to 11ea799 Compare July 14, 2026 11:17
@theCalcaholic

Copy link
Copy Markdown
Contributor Author

@CarlSchwan @come-nc I just pushed a few fixes for mocked shares in various unit tests (which caused issues I missed before the CI pipelines were run).

@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch from 11ea799 to 10dd884 Compare July 14, 2026 11:23
@susnux susnux added the community pull requests from community label Jul 14, 2026
@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch 2 times, most recently from 5dff957 to f0c1b56 Compare July 15, 2026 00:21
…rd protected in IShare->isPasswordProtected()

Signed-off-by: Tobias Knöppler <tobias@knoeppler.org>
@theCalcaholic
theCalcaholic force-pushed the feature/refactor-share-is-pw-protected branch from f0c1b56 to b554ab9 Compare July 16, 2026 08:14
@come-nc come-nc added the 3. to review Waiting for reviews label Jul 16, 2026
@come-nc come-nc added this to the Nextcloud 35 milestone Jul 16, 2026
@theCalcaholic

theCalcaholic commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@come-nc See this comment on the downstream PR #61722 regarding the failing CI jobs.

Let me know, if anything from my side is required (e.g. rebasing) :)

@AndyScherzinger
AndyScherzinger merged commit f3f4308 into nextcloud:master Jul 17, 2026
217 of 230 checks passed
@welcome

welcome Bot commented Jul 17, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews community pull requests from community feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants