diff --git a/.changeset/clever-ties-burn.md b/.changeset/clever-ties-burn.md new file mode 100644 index 0000000000..cdd861e069 --- /dev/null +++ b/.changeset/clever-ties-burn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-user-settings': patch +--- + +Prevent `.set()` to execute a request to the StorageClient if the user is `guest` diff --git a/plugins/user-settings/src/apis/StorageApi/UserSettingsStorage.ts b/plugins/user-settings/src/apis/StorageApi/UserSettingsStorage.ts index 8905b4aeea..ef4d3ead5d 100644 --- a/plugins/user-settings/src/apis/StorageApi/UserSettingsStorage.ts +++ b/plugins/user-settings/src/apis/StorageApi/UserSettingsStorage.ts @@ -118,6 +118,7 @@ export class UserSettingsStorage implements StorageApi { if (!(await this.isSignedIn())) { await this.fallback.set(key, data); this.notifyChanges({ key, presence: 'present', value: data }); + return; } const fetchUrl = await this.getFetchUrl(key);