From bfbfddd05b73b2d3e80a6e30ae7b61c16a06490f Mon Sep 17 00:00:00 2001 From: Sreekanth K K Date: Tue, 12 May 2026 14:07:21 +0530 Subject: [PATCH] added a condition check for error --- ui/app/components/token-editor.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/app/components/token-editor.js b/ui/app/components/token-editor.js index 27e9189b581..d46beed0503 100644 --- a/ui/app/components/token-editor.js +++ b/ui/app/components/token-editor.js @@ -148,10 +148,14 @@ export default class TokenEditorComponent extends Component { this.activeToken.roles = []; } - if (this.tokenRegion === 'global') { - this.activeToken.global = true; - } else { - this.activeToken.global = false; + // Only set global property for new tokens + // Existing tokens cannot toggle global mode + if (this.activeToken.isNew) { + if (this.tokenRegion === 'global') { + this.activeToken.global = true; + } else { + this.activeToken.global = false; + } } // Sets to "never" for auto-selecting the radio button;