diff --git a/ui/app/abilities/variable.js b/ui/app/abilities/variable.js index 7b22d5d40..caa0ae5ec 100644 --- a/ui/app/abilities/variable.js +++ b/ui/app/abilities/variable.js @@ -61,15 +61,12 @@ export default class Variable extends AbstractAbility { ?.capabilities?.includes('destroy'); } - @computed('token.selfTokenPolicies.[]', '_namespace') + @computed('token.selfTokenPolicies.[]', 'namespace') get allPaths() { return (get(this, 'token.selfTokenPolicies') || []) .toArray() .reduce((paths, policy) => { - const matchingNamespace = this._findMatchingNamespace( - get(policy, 'rulesJSON.Namespaces') || [], - this._namespace - ); + const matchingNamespace = this.namespace ?? 'default'; const variables = (get(policy, 'rulesJSON.Namespaces') || []).find( (namespace) => namespace.Name === matchingNamespace diff --git a/ui/app/templates/variables/path.hbs b/ui/app/templates/variables/path.hbs index 4d02ee84c..1a890ba1f 100644 --- a/ui/app/templates/variables/path.hbs +++ b/ui/app/templates/variables/path.hbs @@ -15,7 +15,7 @@ /> {{/if}}