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 allow folder creation with quota of 0 #9372

Merged
merged 1 commit into from
May 7, 2018
Merged

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented May 2, 2018

Fixes #4577

Users with a quota of 0 are a special case. Since they can't (ever)
create files on their own storage. Therefor it makes no real that they
can create folders (and possible share those etc).

Of course the alternative solution would be to do this in an app. However I feel this behavior makes the most sense...

@rullzer rullzer added enhancement 3. to review Waiting for reviews labels May 2, 2018
@rullzer rullzer added this to the Nextcloud 14 milestone May 2, 2018
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍 (users with quota of 0 could not create folders, users that are over their quota can still do even if it is exceeded)

@MorrisJobke
Copy link
Member

users with quota of 0 could not create folders, users that are over their quota can still do even if it is exceeded

Mind to add those scenarios as test cases?

@rullzer
Copy link
Member Author

rullzer commented May 3, 2018

@MorrisJobke sure I can. I just wanted to be sure we all agree this is the expected behavior before doing more work ;)

Fixes #4577

Users with a quota of 0 are a special case. Since they can't (ever)
create files on their own storage. Therefor it makes no real that they
can create folders (and possible share those etc).

Signed-off-by: Roeland Jago Douma <[email protected]>
@codecov
Copy link

codecov bot commented May 3, 2018

Codecov Report

Merging #9372 into master will increase coverage by <.01%.
The diff coverage is 75%.

@@             Coverage Diff             @@
##             master   #9372      +/-   ##
===========================================
+ Coverage      51.2%   51.2%   +<.01%     
- Complexity    25581   25582       +1     
===========================================
  Files          1563    1563              
  Lines         88057   88058       +1     
===========================================
+ Hits          45087   45089       +2     
+ Misses        42970   42969       -1
Impacted Files Coverage Δ Complexity Δ
lib/private/Files/Storage/Wrapper/Quota.php 74.28% <75%> (+0.04%) 33 <2> (+2) ⬆️
apps/files_trashbin/lib/Trashbin.php 72.46% <0%> (-0.25%) 136% <0%> (ø)
lib/private/Template/SCSSCacher.php 72.41% <0%> (+0.79%) 38% <0%> (-1%) ⬇️
apps/files_trashbin/lib/Expiration.php 91.93% <0%> (+1.61%) 29% <0%> (ø) ⬇️

@rullzer
Copy link
Member Author

rullzer commented May 3, 2018

Simple test case added

@MorrisJobke MorrisJobke merged commit 5484260 into master May 7, 2018
@MorrisJobke MorrisJobke deleted the bugfix/4577 branch May 7, 2018 08:11
@MorrisJobke
Copy link
Member

This causes #11485 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants