Skip to content

Commit

Permalink
add isPatchAllowed to jsdoc (#28260)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellobontempo authored Sep 3, 2024
1 parent 3a9db72 commit de87c7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ui/lib/kv/addon/components/kv-subkeys-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ sample subkeys:
```
*
* @example
* <KvSubkeysCard @subkeys={{this.subkeys}} />
* <KvSubkeysCard @subkeys={{this.subkeys}} @isPatchAllowed={{true}} />
*
* @param {object} subkeys - leaf keys of a kv v2 secret, all values (unless a nested object with more keys) return null
* @param {boolean} isPatchAllowed - true if the version is enterprise AND a user has "patch" secret + "read" subkeys capabilities, if true renders the "Patch secret" action
*/

export default class KvSubkeysCard extends Component {
Expand Down
2 changes: 1 addition & 1 deletion ui/lib/kv/addon/components/page/secret/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { isAdvancedSecret } from 'core/utils/advanced-secret';
* @param {boolean} canReadData - if true and the secret is not destroyed/deleted the copy secret dropdown renders
* @param {boolean} canReadMetadata - if true it renders the kv select version dropdown in the toolbar and "Version History" tab
* @param {boolean} canUpdateData - if true it renders "Create new version" toolbar action
* @param {boolean} isPatchAllowed - if true it renders "Patch latest version" toolbar action
* @param {boolean} isPatchAllowed - isPatchAllowed is true if the version is enterprise AND a user has "patch" secret + "read" subkeys capabilities, if true it renders "Patch latest version" toolbar action
* @param {model} metadata - Ember data model: 'kv/metadata'
* @param {string} path - path of kv secret 'my/secret' used as the title for the KV page header
* @param {model} secret - Ember data model: 'kv/data'
Expand Down
2 changes: 2 additions & 0 deletions ui/lib/kv/addon/components/page/secret/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { isDeleted } from 'kv/utils/kv-deleted';
* @breadcrumbs={{this.breadcrumbs}}
* @canReadMetadata={{true}}
* @canUpdateData={{true}}
* @isPatchAllowed={{true}}
* @metadata={{this.model.metadata}}
* @path={{this.model.path}}
* @subkeys={{this.model.subkeys}}
Expand All @@ -23,6 +24,7 @@ import { isDeleted } from 'kv/utils/kv-deleted';
* @param {array} breadcrumbs - Array to generate breadcrumbs, passed to the page header component
* @param {boolean} canReadMetadata - permissions to read metadata
* @param {boolean} canUpdateData - permissions to create a new version of a secret
* @param {boolean} isPatchAllowed - isPatchAllowed is true if the version is enterprise AND a user has "patch" secret + "read" subkeys capabilities, passed to KvSubkeysCard
* @param {model} metadata - Ember data model: 'kv/metadata'
* @param {string} path - path to request secret data for selected version
* @param {object} subkeys - API response from subkeys endpoint, object with "subkeys" and "metadata" keys. This arg is null for community edition
Expand Down

0 comments on commit de87c7f

Please sign in to comment.