Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Commit

Permalink
Bug 1184272: specify all API scopes as [[str]]
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Jul 24, 2015
1 parent c0f6706 commit f218cae
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/routes/v1.js
Expand Up @@ -50,7 +50,7 @@ api.declare({
route: '/worker-type/:workerType',
name: 'createWorkerType',
deferAuth: true,
scopes: ['aws-provisioner:manage-worker-type:<workerType>'],
scopes: [['aws-provisioner:manage-worker-type:<workerType>']],
input: SCHEMA_PREFIX_CONST + 'create-worker-type-request.json#',
output: SCHEMA_PREFIX_CONST + 'get-worker-type-response.json#',
title: 'Create new Worker Type',
Expand Down Expand Up @@ -155,7 +155,7 @@ api.declare({
name: 'updateWorkerType',
deferAuth: true,
// Shouldn't we just have a single scope for modifying/creating/deleting workerTypes
scopes: ['aws-provisioner:manage-worker-type:<workerType>'],
scopes: [['aws-provisioner:manage-worker-type:<workerType>']],
input: SCHEMA_PREFIX_CONST + 'create-worker-type-request.json#',
output: SCHEMA_PREFIX_CONST + 'get-worker-type-response.json#',
title: 'Update Worker Type',
Expand Down Expand Up @@ -218,8 +218,8 @@ api.declare({
name: 'workerType',
deferAuth: true,
scopes: [
'aws-provisioner:view-worker-type:<workerType>',
'aws-provisioner:manage-worker-type:<workerType>',
['aws-provisioner:view-worker-type:<workerType>'],
['aws-provisioner:manage-worker-type:<workerType>'],
],
input: undefined, // No input
output: SCHEMA_PREFIX_CONST + 'get-worker-type-response.json#',
Expand Down Expand Up @@ -261,7 +261,7 @@ api.declare({
name: 'removeWorkerType',
deferAuth: true,
// TODO: Should we have a special scope for workertype removal?
scopes: ['aws-provisioner:manage-worker-type:<workerType>'],
scopes: [['aws-provisioner:manage-worker-type:<workerType>']],
input: undefined, // No input
output: undefined, // No output
title: 'Delete Worker Type',
Expand Down Expand Up @@ -300,7 +300,7 @@ api.declare({
route: '/list-worker-types',
name: 'listWorkerTypes',
scopes: [
'aws-provisioner:list-worker-types',
['aws-provisioner:list-worker-types'],
],
input: undefined, // No input
output: SCHEMA_PREFIX_CONST + 'list-worker-types-response.json#',
Expand All @@ -327,7 +327,7 @@ api.declare({
method: 'put',
route: '/secret/:token',
name: 'createSecret',
scopes: ['aws-provisioner:create-secret'],
scopes: [['aws-provisioner:create-secret']],
input: SCHEMA_PREFIX_CONST + 'create-secret-request.json#',
title: 'Create new Secret',
description: [
Expand Down Expand Up @@ -502,8 +502,8 @@ api.declare({
name: 'getLaunchSpecs',
deferAuth: true,
scopes: [
'aws-provisioner:view-worker-type:<workerType>',
'aws-provisioner:manage-worker-type:<workerType>',
['aws-provisioner:view-worker-type:<workerType>'],
['aws-provisioner:manage-worker-type:<workerType>'],
],
input: undefined, // No input
output: SCHEMA_PREFIX_CONST + 'get-launch-specs-response.json#',
Expand Down Expand Up @@ -542,7 +542,7 @@ api.declare({
route: '/aws-state',
name: 'awsState',
title: 'Get AWS State for all worker types',
scopes: ['aws-provisioner:aws-state'],
scopes: [['aws-provisioner:aws-state']],
description: [
'DEPRECATED.',
].join('\n'),
Expand Down Expand Up @@ -587,7 +587,7 @@ api.declare({
route: '/state/:workerType',
name: 'state',
title: 'Get AWS State for a worker type',
scopes: ['aws-provisioner:view-worker-type:<workerType>'],
scopes: [['aws-provisioner:view-worker-type:<workerType>']],
description: [
'Return the state of a given workertype as stored by the provisioner. ',
'This state is stored as three lists: 1 for all instances, 1 for requests',
Expand Down

0 comments on commit f218cae

Please sign in to comment.