diff --git a/backend/internal/access-list.js b/backend/internal/access-list.js index 69e13f4..a640c1e 100644 --- a/backend/internal/access-list.js +++ b/backend/internal/access-list.js @@ -25,10 +25,6 @@ const internalAccessList = { create: (access, data) => { return access.can('access_lists:create', data) .then((/*access_data*/) => { - if ((typeof data.items === 'undefined' || !data.items.length) && (typeof data.clients === 'undefined' || !data.clients.length)) { - throw new error.InternalValidationError('At leaste one user/pass or address must be defined'); - } - return accessListModel .query() .omit(omissions()) @@ -114,10 +110,6 @@ const internalAccessList = { update: (access, data) => { return access.can('access_lists:update', data.id) .then((/*access_data*/) => { - if ((typeof data.items === 'undefined' || !data.items.length) && (typeof data.clients === 'undefined' || !data.clients.length)) { - throw new error.InternalValidationError('At leaste one user/pass or address must be defined'); - } - return internalAccessList.get(access, {id: data.id}); }) .then((row) => { diff --git a/frontend/js/app/nginx/access/form.ejs b/frontend/js/app/nginx/access/form.ejs index 40fe854..3f127cc 100644 --- a/frontend/js/app/nginx/access/form.ejs +++ b/frontend/js/app/nginx/access/form.ejs @@ -55,6 +55,18 @@
+
+
+
+ +
+
+
+
+ +
+
+
Note that the allow and deny directives will be applied in the order they are defined.
diff --git a/frontend/js/app/nginx/access/form.js b/frontend/js/app/nginx/access/form.js index fdfbb65..8efdb72 100644 --- a/frontend/js/app/nginx/access/form.js +++ b/frontend/js/app/nginx/access/form.js @@ -119,7 +119,7 @@ module.exports = Mn.View.extend({ } } - let clients_to_add = 5 - clients.length; + let clients_to_add = 4 - clients.length; if (clients_to_add) { for (let i = 0; i < clients_to_add; i++) { clients.push({});