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

Do not show full storage notification to users with 0 Bytes quota #43544

Conversation

jkhradil
Copy link

@jkhradil jkhradil commented Feb 13, 2024

Summary

Do not show “Your storage is full, files can not be updated or synced anymore!” notification to users with quota set to 0 Bytes.

Checklist

@jkhradil jkhradil requested a review from skjnldsv as a code owner February 13, 2024 09:17
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

Nice catch

@skjnldsv skjnldsv requested review from a team, nfebe, sorbaugh and susnux and removed request for a team February 13, 2024 18:39
@susnux susnux added this to the Nextcloud 29 milestone Feb 13, 2024
@skjnldsv
Copy link
Member

/compile rebase /

@skjnldsv
Copy link
Member

/backport to stable28

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 14, 2024
@skjnldsv

This comment was marked as resolved.

@skjnldsv skjnldsv force-pushed the no-full-storage-notification-0-quota branch from 7d3e563 to 1806b63 Compare February 15, 2024 07:18
@skjnldsv

This comment was marked as resolved.

@nextcloud nextcloud deleted a comment from backportbot bot Feb 15, 2024
Comment on lines +91 to +92
// Warn the user if the available storage is 0 on page load, except for users with 0 B quota
if (this.storageStats?.free <= 0 && this.storageStats?.quota != 0) {
Copy link
Member

@joshtrichards joshtrichards Feb 17, 2024

Choose a reason for hiding this comment

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

Suggested change
// Warn the user if the available storage is 0 on page load, except for users with 0 B quota
if (this.storageStats?.free <= 0 && this.storageStats?.quota != 0) {
// Warn the user if the available storage is 0 on page load, except for users with 0 B or unlimited quota
if (this.storageStats?.free <= 0 && this.storageStats?.quota != 0 && this.storageStats?.quota != -3) {

I think something like the above can fix #43280 here too at the other end of the quota spectrum (an unlimited one).

When the quota is unlimited, quota should be -3 here e.g. SPACE_UNLIMITED via getStorageInfo() and getUserQuota() et al.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I think this makes sense

Copy link
Member

Choose a reason for hiding this comment

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

Then let's check for quota greater or equal to 0. That way we also ignore negative quotas

Resolves nextcloud#43535

Signed-off-by: jkhradil <jkhradil@gmail.com>
@joshtrichards joshtrichards force-pushed the no-full-storage-notification-0-quota branch from 1806b63 to ffd4f0c Compare February 18, 2024 01:56
@joshtrichards

This comment was marked as outdated.

@joshtrichards
Copy link
Member

/compile

joshtrichards added a commit that referenced this pull request Feb 19, 2024
…quotas

Fixes #43535 
Fixes #43280 

Replaces #43544 

Signed-off-by: Josh <josh.t.richards@gmail.com>
nextcloud-command pushed a commit that referenced this pull request Feb 19, 2024
…quotas

Fixes #43535
Fixes #43280

Replaces #43544

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@joshtrichards
Copy link
Member

Replacement for this PR in #43666 (to fix asset compilation). New PR also fixes #43280 (with any luck) at same time. Sorry @jkhradil for the swap-out, but I wanted to keep this one moving to give it a possible (tiny) chance of yet making it into v28.0.3.

@joshtrichards joshtrichards removed the 4. to release Ready to be released and/or waiting for tests to finish label Feb 19, 2024
backportbot bot pushed a commit that referenced this pull request Feb 20, 2024
…quotas

Fixes #43535

Fixes #43280

Replaces #43544

Signed-off-by: Josh <josh.t.richards@gmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

[skip ci]
nextcloud-command pushed a commit that referenced this pull request Feb 20, 2024
…quotas

Fixes #43535

Fixes #43280

Replaces #43544

Signed-off-by: Josh <josh.t.richards@gmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
backportbot bot pushed a commit that referenced this pull request Feb 21, 2024
…quotas

Fixes #43535

Fixes #43280

Replaces #43544

Signed-off-by: Josh <josh.t.richards@gmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

[skip ci]
nextcloud-command pushed a commit that referenced this pull request Feb 21, 2024
…quotas

Fixes #43535

Fixes #43280

Replaces #43544

Signed-off-by: Josh <josh.t.richards@gmail.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
hardviper pushed a commit to hardviper/server that referenced this pull request Feb 21, 2024
…quotas

Fixes nextcloud#43535
Fixes nextcloud#43280

Replaces nextcloud#43544

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: d.kudrinskiy <hardviper@icloud.com>
@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants