Skip to content

fix(OC_Helper): properly calculate quota of shared storages#60341

Merged
AndyScherzinger merged 1 commit into
masterfrom
fix/quota-calc-share
May 19, 2026
Merged

fix(OC_Helper): properly calculate quota of shared storages#60341
AndyScherzinger merged 1 commit into
masterfrom
fix/quota-calc-share

Conversation

@susnux
Copy link
Copy Markdown
Contributor

@susnux susnux commented May 13, 2026

Summary

First we need to properly handle shared storages,
because there the quota is the quota of the user who owns the nodes, not the user who shared the nodes.

Second if no user can be fetched then we cannot get the global storage info, thus in this case (public share?) we need to safe-guard.

Checklist

AI (if applicable)

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

@susnux susnux added this to the Nextcloud 34 milestone May 13, 2026
@susnux susnux requested a review from a team as a code owner May 13, 2026 08:41
@susnux susnux added bug 3. to review Waiting for reviews labels May 13, 2026
@susnux susnux requested review from ArtificialOwl, come-nc, icewind1991 and leftybournes and removed request for a team May 13, 2026 08:41
@susnux
Copy link
Copy Markdown
Contributor Author

susnux commented May 13, 2026

/backport to stable33

@susnux susnux requested review from provokateurin and removed request for ArtificialOwl May 13, 2026 08:41
Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread lib/private/legacy/OC_Helper.php Outdated
@susnux
Copy link
Copy Markdown
Contributor Author

susnux commented May 15, 2026

/backport to stable34

Copy link
Copy Markdown
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

Does that impact #53048 ?

@susnux
Copy link
Copy Markdown
Contributor Author

susnux commented May 19, 2026

Does that impact #53048 ?

not direct. It should do the same (rebase) in the new code.
I hope to get some time looking into that PR again but likely not before 34 release.

@susnux susnux force-pushed the fix/quota-calc-share branch 2 times, most recently from 3e6380c to 7d48498 Compare May 19, 2026 10:42
- resolves #55659

First we need to properly handle shared storages,
because there the quota is the quota of the user who owns the nodes,
not the user who shared the nodes.

Second if no user can be fetched then we cannot get the global storage
info, thus in this case (public share?) we need to safe-guard.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/quota-calc-share branch from 7d48498 to 29fc48e Compare May 19, 2026 11:27
@AndyScherzinger AndyScherzinger merged commit 98b99c2 into master May 19, 2026
190 of 194 checks passed
@AndyScherzinger AndyScherzinger deleted the fix/quota-calc-share branch May 19, 2026 13:04
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 bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: setting 'quota_include_external_storage' => true breaks directory share links with Argument #2 ($user) must be of type OCP\\IUser, null given

4 participants