KV automatic delete state issue in UI (#13166)

* converts secret-v2-version model to native class -- fixes issues with cached values for deleted prop

* adds changelog entry

* adds disabled state to ToolbarLink component and disables create new version action when users cannot read metadata

* updates secret-edit acceptance test
This commit is contained in:
Jordan Reimer
2021-11-23 14:17:37 -07:00
committed by GitHub
parent 01aa0951bd
commit 91407e1968
12 changed files with 141 additions and 58 deletions

View File

@@ -7,15 +7,17 @@
* ```js
* <Toolbar>
* <ToolbarActions>
* <ToolbarLink @params={{array 'vault.cluster.policies.create'}} @type="add">
* <ToolbarLink @params={{array 'vault.cluster.policies.create'}} @type="add" @disabled={{true}} @disabledTooltip="This link is disabled">
* Create policy
* </ToolbarLink>
* </ToolbarActions>
* </Toolbar>
* ```
*
* @param params=''{Array} Array to pass to LinkTo
* @param type=''{String} Use "add" to change icon
* @param {array} params - Array to pass to LinkTo
* @param {string} type - Use "add" to change icon
* @param {boolean} disabled - pass true to disable link
* @param {string} disabledTooltip - tooltip to display on hover when disabled
*/
import Component from '@ember/component';
@@ -27,6 +29,8 @@ export default Component.extend({
tagName: '',
supportsDataTestProperties: true,
type: null,
disabled: false,
disabledTooltip: null,
glyph: computed('type', function() {
if (this.type == 'add') {
return 'plus-plain';