Merge branch 'master-oss' into identity-upgrade-nil-check

This commit is contained in:
Jeff Mitchell 2018-04-24 23:29:36 -04:00
commit 06e4acece7
2 changed files with 8 additions and 20 deletions

View File

@ -75,6 +75,9 @@ BUG FIXES:
* ui: Fixed an issue where policies with commas would not render in the * ui: Fixed an issue where policies with commas would not render in the
interface properly [GH-4398] interface properly [GH-4398]
* ui: Corrected the saving of mount tune ttls for auth methods [GH-4431] * ui: Corrected the saving of mount tune ttls for auth methods [GH-4431]
* ui: Credentials generation no longer checks capabilities before making
api calls. This should fix needing "update" capabilites to read IAM
credentials in the AWS secrets engine [GH-4446]
## 0.10.0 (April 10th, 2018) ## 0.10.0 (April 10th, 2018)

View File

@ -10,14 +10,6 @@ export default Ember.Route.extend(UnloadModel, {
return this.modelFor('vault.cluster.secrets.backend'); return this.modelFor('vault.cluster.secrets.backend');
}, },
pathQuery(role, backend) {
const type = this.backendModel().get('type');
if (type === 'pki') {
return `${backend}/issue/${role}`;
}
return `${backend}/creds/${role}`;
},
model(params) { model(params) {
const role = params.secret; const role = params.secret;
const backendModel = this.backendModel(); const backendModel = this.backendModel();
@ -26,18 +18,11 @@ export default Ember.Route.extend(UnloadModel, {
if (!SUPPORTED_DYNAMIC_BACKENDS.includes(backendModel.get('type'))) { if (!SUPPORTED_DYNAMIC_BACKENDS.includes(backendModel.get('type'))) {
return this.transitionTo('vault.cluster.secrets.backend.list-root', backend); return this.transitionTo('vault.cluster.secrets.backend.list-root', backend);
} }
return this.store return Ember.RSVP.resolve({
.queryRecord('capabilities', { id: this.pathQuery(role, backend) }) backend,
.then(capabilities => { id: role,
if (!capabilities.get('canUpdate')) { name: role,
return this.transitionTo('vault.cluster.secrets.backend.list-root', backend); });
}
return Ember.RSVP.resolve({
backend,
id: role,
name: role,
});
});
}, },
setupController(controller) { setupController(controller) {