From 6632e0e8a1509a302374f08f9d451fd52b0334a1 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Wed, 27 Sep 2017 19:12:44 +0545 Subject: [PATCH] Allow 0 byte quota to be entered on UI --- settings/js/users/users.js | 2 +- tests/ui/features/other/users.feature | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index f64869c064e7..e0edb282719f 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -542,7 +542,7 @@ var UserList = { } if ( ['default', 'none'].indexOf(quota) === -1 - && (!OC.Util.computerFileSize(quota)) + && (OC.Util.computerFileSize(quota) === null) ) { // the select component has added the bogus value, delete it again $select.find('option[selected]').remove(); diff --git a/tests/ui/features/other/users.feature b/tests/ui/features/other/users.feature index f6dc0aa29feb..dd1d51086aaf 100644 --- a/tests/ui/features/other/users.feature +++ b/tests/ui/features/other/users.feature @@ -21,6 +21,7 @@ Feature: users |Unlimited |5B |5 B | |Unlimited |55kB |55 KB | |Unlimited |45Kb |45 KB | + |Unlimited |0 Kb |0 B | Scenario Outline: change quota to an invalid value When quota of user "%regularuser%" is changed to "" @@ -34,6 +35,7 @@ Feature: users |30/40GB | |30/40 | |3+56 B | + |-1 B | Scenario: create simple user When I create a user with the name "guiusr1" and the password "pwd"