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

unable to set 0 bytes quota on an user via provisioning api #19811

Closed
michag86 opened this issue Oct 15, 2015 · 13 comments
Closed

unable to set 0 bytes quota on an user via provisioning api #19811

michag86 opened this issue Oct 15, 2015 · 13 comments

Comments

@michag86
Copy link
Contributor

michag86 commented Oct 15, 2015

It's not set the quota of an user to 0 bytes.
0 oder 0B or 0MB are always converted to 0. This is reserved as "default".

We would like to assigne 0 bytes for read-only users.

Tested on ownCloud 8.1.1, but I think there are no changes in 8.1.3.

@PVince81
Copy link
Contributor

@tomneedham @MTRichards @karlitschek might need API design change.

@nickvergessen
Copy link
Contributor

Yeah, default should be -2 (-1 is none, so negative numbers are already used for special cases),
but it's used since 2014:
dc85c20#diff-d63ef796ade5860b68adcc00dc5639a6R163

@PVince81 PVince81 added this to the backlog milestone Mar 1, 2016
@PVince81
Copy link
Contributor

This will require a change of API... version 2 ? 😦 @DeepDiver1975

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@DeepDiver1975
Copy link
Member

Turns out that when submitting 0 or 0MB via the provisioning api it will be used as 0 bytes. The quota will be set to 0. As far as I can tell this behavior exists since at least this change 15d1341

I propose to add magic values named default and none instead of any number magic.

@PVince81 objections?

@DeepDiver1975
Copy link
Member

DeepDiver1975 commented Mar 12, 2018

looks like it was working this way (as described in the ticket) back in oc8 - dc85c20#diff-d63ef796ade5860b68adcc00dc5639a6R163

@PVince81
Copy link
Contributor

I'm fine to go with the "default" and "none" strings

@PVince81
Copy link
Contributor

or instead of "none" make that "unlimited"

@DeepDiver1975
Copy link
Member

DeepDiver1975 commented Mar 12, 2018

actually 'none' should be used when no quota is to be set - so 0 and 'none' are synonyms ...

@DeepDiver1975
Copy link
Member

or instead of "none" make that "unlimited"

none is in the code base for the very first day... let's stick to it

DeepDiver1975 added a commit that referenced this issue Mar 12, 2018
…gic values. Any numeric number will be interpreted as a true value.
@DeepDiver1975 DeepDiver1975 modified the milestones: backlog, development Mar 12, 2018
@DeepDiver1975 DeepDiver1975 self-assigned this Mar 12, 2018
DeepDiver1975 added a commit that referenced this issue Mar 12, 2018
…gic values. Any numeric number will be interpreted as a true value.
DeepDiver1975 added a commit that referenced this issue Mar 13, 2018
…gic values. Any numeric number will be interpreted as a true value.
PVince81 pushed a commit that referenced this issue Mar 13, 2018
fixes #19811 - only use existing key words 'default' and 'none' as ma…
@PVince81
Copy link
Contributor

fixed through #30755 (review)

DeepDiver1975 added a commit that referenced this issue Mar 19, 2018
…gic values. Any numeric number will be interpreted as a true value.
@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants