Hide upload options for users with 0 quota

Open Beginner friendly
#19,913 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
backend, web-dev

Research direction

Start in lib/Capabilities.php at the capability checks around lines 283 and 417–423. Read how the upload allowed value is set and how quota is checked; make zero quota disable uploads, including dropping files. Done means upload options are hidden and dropped files cannot be sent for users with no quota.

Written by the indexing model from the issue text.

Description

bug feature: api 🛠️ feature: frontend 🖌️ feature: upload & shares & voice 📤🎙️ Needs triage regression

[!TIP]

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Have a user with no quota
  2. Be in Talk and try to upload something
Expected behaviour

The option should not be visible for users with no quota in the first place. Also dropping files should not work

Actual behaviour

Upload is visible and even tried, resulting in non-sent messages

Background

https://github.com/nextcloud/spreed/blob/0c16be7fe5807922f274b467e7230b6669fff7c8/lib/Capabilities.php#L283

Here we only set allowed only based on the user backend (sidenote: that might change in the future as well, since there were changes in the guests app).

Since we already check the quota at

https://github.com/nextcloud/spreed/blob/0c16be7fe5807922f274b467e7230b6669fff7c8/lib/Capabilities.php#L417-L423

we should be able to set allowed to false in case of quota 0.

Talk app

Talk app version: 25.0.6

Browser

Operating system: Tested on Windows

Browser name: Chrome

Dominant language
JavaScript
Stars
2.2k
Forks
598
Avg merge
21h 32m
Merged PRs (30d)
391

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/spreed

All issues in nextcloud/spreed

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.