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

Commit

Permalink
Approle edition is sending local_secret_ids, which isn't supported on…
Browse files Browse the repository at this point in the history
… edit (#251)

Fix a problem where closing the edit modal prevents you from open the
same approle again, unless you click another one
  • Loading branch information
protetore authored and djenriquez committed Jun 6, 2018
1 parent a7483a1 commit 36266ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/Authentication/AppRole/AppRole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class AppRoleAuthBackend extends React.Component {
callVaultApi('get', `${this.baseVaultPath}/role/${this.state.selectedItemName}`, null, null)
.then((resp) => {
let appRole = _.get(resp, 'data.data', {});
this.setState({ itemConfig: appRole, openEditItemDialog: true });
this.setState({ itemConfig: _.omit(appRole, "local_secret_ids"), openEditItemDialog: true });
})
.catch((error) => {
if (error.response.status !== 404) {
Expand Down Expand Up @@ -427,7 +427,7 @@ export default class AppRoleAuthBackend extends React.Component {
modal={false}
actions={actions}
open={this.state.openNewItemDialog}
onRequestClose={() => this.setState({ openNewItemDialog: false, itemConfig: _.clone(this.itemConfigSchema) })}
onRequestClose={() => this.setState({ openNewItemDialog: false, itemConfig: _.clone(this.itemConfigSchema), selectedItemName: undefined })}
autoScrollBodyContent={true}
>
{renderFields()}
Expand Down

0 comments on commit 36266ea

Please sign in to comment.