mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	valite auth/access rules in backend
This commit is contained in:
		| @@ -25,6 +25,10 @@ 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()) | ||||
| @@ -110,6 +114,10 @@ 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) => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user