Flesh out Cobalt, LDAP groups, &c.
This commit is contained in:
61
app/routing/routers/api/v1/ldap.routes.js
Normal file
61
app/routing/routers/api/v1/ldap.routes.js
Normal file
@@ -0,0 +1,61 @@
|
||||
const ldap_routes = {
|
||||
prefix: '/api/v1/ldap',
|
||||
|
||||
middleware: [
|
||||
'auth:UserOnly',
|
||||
],
|
||||
|
||||
get: {
|
||||
'/clients': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:clients:list' }],
|
||||
'controller::api:v1:LDAP.get_clients',
|
||||
],
|
||||
'/clients/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:clients:get' }],
|
||||
'controller::api:v1:LDAP.get_client',
|
||||
],
|
||||
'/groups': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:groups:list' }],
|
||||
'controller::api:v1:LDAP.get_groups',
|
||||
],
|
||||
'/groups/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:groups:get' }],
|
||||
'controller::api:v1:LDAP.get_group',
|
||||
],
|
||||
},
|
||||
|
||||
post: {
|
||||
'/clients': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:clients:create' }],
|
||||
'controller::api:v1:LDAP.create_client',
|
||||
],
|
||||
'/groups': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:groups:create' }],
|
||||
'controller::api:v1:LDAP.create_group',
|
||||
],
|
||||
},
|
||||
|
||||
patch: {
|
||||
'/clients/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:clients:update' }],
|
||||
'controller::api:v1:LDAP.update_client',
|
||||
],
|
||||
'/groups/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:groups:update' }],
|
||||
'controller::api:v1:LDAP.update_group',
|
||||
],
|
||||
},
|
||||
|
||||
delete: {
|
||||
'/clients/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:clients:delete' }],
|
||||
'controller::api:v1:LDAP.delete_client',
|
||||
],
|
||||
'/groups/:id': [
|
||||
['middleware::api:Permission', { check: 'v1:ldap:groups:delete' }],
|
||||
'controller::api:v1:LDAP.delete_group',
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = exports = ldap_routes
|
||||
Reference in New Issue
Block a user