-
Notifications
You must be signed in to change notification settings - Fork 168
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
File Share Quota incorrectly determined for share folders #5817
Comments
Is it possible to get this looked at for comment? |
Any chance for a response on this? |
Well, I absolutely agree with the expected behavior. In the case of a share, User A is using the quota of User B. Consequently, it should not matter at all whether User A has quota or not. Writing into a folder that belongs to User B needs to be possible within the frame of User B's quota. Does that answer the question? |
@rpocklin do you want to work on that yourself or should we bring in a PR? |
Hi @kulmann, I'm not confident creating one as I am unsure how to get the relevant metrics of the share info. Let me know if you are able to make a PR for this and I can certainly review / test it. |
I think in a first iteration we should just disable the quota check inside shared folders. I.e. Uploads would then just fail with a quota related response from the backend if the quota is exceeded. That's better than never being able to upload into a share (if your own quota is used up). |
@kulmann Maybe we also want to think about discarding the check and disabling the button entirely. |
Sounds good, let's do that. |
According to my comment:
I don't think this will be possible, we would likely expose sensitive user information |
There is a current issue in logic checking if
quota && quota.free > 0
inAppBar.vue
in order to enable or disable theNew +
button.web/packages/web-app-files/src/components/AppBar/AppBar.vue
Lines 264 to 273 in 76036fd
This makes an assumption the user is in his/her personal space (as it looks up the quota returned from the
$client.users.getUser(this.user.id)
which works well for personal space.web/packages/web-app-files/src/views/Personal.vue
Lines 373 to 376 in 60b60d1
This does not work well for shared folders.
If User A shares a folder 1 with user B, correct me if i'm wrong, but all files added or modified in the folder 1 would relate to User A's quota, not user B (as user A is the owner of folder 1). Currently, if user B is set to have 0B personal quota, the buttons for
New +
get disabled, even in the shared folder screens as it assumes, since the current user B has no available personal quota, he/she cannot add or upload any more files, even within a shared folder.Steps to reproduce
New +
button because this user has 0B quota.Expected behaviour
It should either do a
fileInfo
call on thecurrentFolder
or similar to ascertain the quota metrics in this share.I am unsure how to approach a fix to this - there are 4 metrics for the quota (
free
,relative
,used
andtotal
).The application should then call
SET_QUOTA
with these correct values, relative to the share.Expected user behaviour is that the user can click on the
New +
button.Actual behaviour
The user cannot click on the
New +
button.The text was updated successfully, but these errors were encountered: