-
Notifications
You must be signed in to change notification settings - Fork 448
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
Hide upload button with zero quota #5036
Conversation
Shouldn’t this distinguish between upload and share? If a normal user is created without quota, he‘s not allowed to upload something, but he could still share something that was shared with him. This PR would hide both options..? |
I've tested this yesterday with @Ivansss and it worked just fine. He shared a folder with me, I uploaded a picture and in talk shared in our conversation. So only difference was, that I uploaded the picture, but I don't see why it should behave differently there. |
@SystemKeeper were you logged in as a guest user from the "guests" app or as a regular user ? |
Alright, I think I see your point. You could be a regular user (not guest app user) but have zero quota. Then the API would allow it. This means we need another mechanism to detect if the current user is a guest app user. |
@PVince81 I'm a guest user on cloud.nextcloud.com (at least as far as I know) |
That was my main concern, yes! |
I need to retest everything (including changing attachment folder as guest) because I had an incomplete local setup. I had set the guest whitelist of apps to "files,spreed" and apparently it breaks shares. |
Whenever a user has zero quota, for example like guest app users, don't display the upload button. The quota value is retrieved for the attachment folder. Signed-off-by: Vincent Petry <[email protected]>
3583b13
to
b8fd427
Compare
Okay, with the correct whitelist (default one + spreed) sharing from a received folder works fine. I've adjusted the code to distinguish between "upload perm" and "share perm". |
Don't render the new message actions container when there are no actions to render. Signed-off-by: Vincent Petry <[email protected]>
Whenever a user has zero quota, for example like guest app users, don't
display the upload button.
The quota value is retrieved for the attachment folder.
Fixes #4138