Skip to content

Commit

Permalink
Centrally configure abilities for allowing certain endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
John Cowen committed Feb 4, 2021
1 parent 66c8cc9 commit e66c220
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions ui/packages/consul-ui/app/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ export const routes = {
intentions: {
_options: { path: '/intentions' },
edit: {
_options: { path: '/:intention_id' },
_options: {
path: '/:intention_id',
abilities: ['read intentions'],
},
},
create: {
_options: { path: '/create' },
_options: {
path: '/create',
abilities: ['create intentions'],
},
},
},
// Key/Value
Expand All @@ -107,10 +113,16 @@ export const routes = {
_options: { path: '/*key/edit' },
},
create: {
_options: { path: '/*key/create' },
_options: {
path: '/*key/create',
abilities: ['create kvs'],
},
},
'root-create': {
_options: { path: '/create' },
_options: {
path: '/create',
abilities: ['create kvs'],
},
},
},
// ACLs
Expand Down

0 comments on commit e66c220

Please sign in to comment.