| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = [ | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'POST', | 
					
						
							|  |  |  |     path: '/users/batch-delete', | 
					
						
							|  |  |  |     handler: 'user.deleteMany', | 
					
						
							|  |  |  |     config: { | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |       policies: [{ name: 'admin::hasPermissions', config: { actions: ['admin::users.delete'] } }], | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'GET', | 
					
						
							|  |  |  |     path: '/roles/:id/permissions', | 
					
						
							|  |  |  |     handler: 'role.getPermissions', | 
					
						
							|  |  |  |     config: { | 
					
						
							|  |  |  |       policies: [ | 
					
						
							|  |  |  |         'admin::isAuthenticatedAdmin', | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |         { name: 'admin::hasPermissions', config: { actions: ['admin::roles.read'] } }, | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |       ], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'PUT', | 
					
						
							|  |  |  |     path: '/roles/:id/permissions', | 
					
						
							|  |  |  |     handler: 'role.updatePermissions', | 
					
						
							|  |  |  |     config: { | 
					
						
							|  |  |  |       policies: [ | 
					
						
							|  |  |  |         'admin::isAuthenticatedAdmin', | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |         { name: 'admin::hasPermissions', config: { actions: ['admin::roles.update'] } }, | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |       ], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'GET', | 
					
						
							|  |  |  |     path: '/roles/:id', | 
					
						
							|  |  |  |     handler: 'role.findOne', | 
					
						
							|  |  |  |     config: { | 
					
						
							|  |  |  |       policies: [ | 
					
						
							|  |  |  |         'admin::isAuthenticatedAdmin', | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |         { name: 'admin::hasPermissions', config: { actions: ['admin::roles.read'] } }, | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |       ], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'GET', | 
					
						
							|  |  |  |     path: '/roles', | 
					
						
							|  |  |  |     handler: 'role.findAll', | 
					
						
							|  |  |  |     config: { | 
					
						
							|  |  |  |       policies: [ | 
					
						
							|  |  |  |         'admin::isAuthenticatedAdmin', | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |         { name: 'admin::hasPermissions', config: { actions: ['admin::roles.read'] } }, | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |       ], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   { | 
					
						
							|  |  |  |     method: 'PUT', | 
					
						
							|  |  |  |     path: '/roles/:id', | 
					
						
							|  |  |  |     handler: 'role.update', | 
					
						
							|  |  |  |     config: { | 
					
						
							|  |  |  |       policies: [ | 
					
						
							|  |  |  |         'admin::isAuthenticatedAdmin', | 
					
						
							| 
									
										
										
										
											2021-10-04 18:16:28 +02:00
										 |  |  |         { name: 'admin::hasPermissions', config: { actions: ['admin::roles.update'] } }, | 
					
						
							| 
									
										
										
										
											2021-09-08 16:16:16 +02:00
										 |  |  |       ], | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | ]; |