Skip to content

Commit

Permalink
web/satellite: fix create bucket in wrong project
Browse files Browse the repository at this point in the history
This change fixes an issue where a bucket could be created in a prior
selected project due to the previous s3 credentials not being cleared.

Issue: #6852

Change-Id: I336abe5422f53b89448c955e991da6cceb064b73
  • Loading branch information
wilfred-asomanii authored and Storj Robot committed Mar 21, 2024
1 parent 03a9d0f commit 5199e15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions web/satellite/src/layouts/default/Default.vue
Expand Up @@ -31,6 +31,7 @@ import { useAccessGrantsStore } from '@/store/modules/accessGrantsStore';
import { AnalyticsErrorEventSource } from '@/utils/constants/analyticsEventNames';
import { useNotify } from '@/utils/hooks';
import { ROUTES } from '@/router';
import { useBucketsStore } from '@/store/modules/bucketsStore';
import SessionWrapper from '@/components/utils/SessionWrapper.vue';
import UpgradeAccountDialog from '@/components/dialogs/upgradeAccountFlow/UpgradeAccountDialog.vue';
Expand All @@ -41,6 +42,7 @@ const router = useRouter();
const route = useRoute();
const notify = useNotify();
const bucketsStore = useBucketsStore();
const projectsStore = useProjectsStore();
const appStore = useAppStore();
const agStore = useAccessGrantsStore();
Expand Down Expand Up @@ -93,6 +95,7 @@ async function selectProject(urlId: string): Promise<void> {
watch(() => route.params.id, async newId => {
if (newId === undefined) return;
bucketsStore.clearS3Data();
isLoading.value = true;
await selectProject(newId as string);
isLoading.value = false;
Expand Down
6 changes: 0 additions & 6 deletions web/satellite/src/layouts/default/ProjectNav.vue
Expand Up @@ -264,9 +264,7 @@ import { useAnalyticsStore } from '@/store/modules/analyticsStore';
import { useAppStore } from '@/store/modules/appStore';
import { useUsersStore } from '@/store/modules/usersStore';
import { AnalyticsEvent, PageVisitSource } from '@/utils/constants/analyticsEventNames';
import { useBucketsStore } from '@/store/modules/bucketsStore';
import { ROUTES } from '@/router';
import { useConfigStore } from '@/store/modules/configStore';
import { useTrialCheck } from '@/composables/useTrialCheck';
import IconProject from '@/components/icons/IconProject.vue';
Expand All @@ -289,12 +287,10 @@ import IconApplications from '@/components/icons/IconApplications.vue';
import EnterProjectPassphraseDialog
from '@/components/dialogs/EnterProjectPassphraseDialog.vue';
const configStore = useConfigStore();
const analyticsStore = useAnalyticsStore();
const projectsStore = useProjectsStore();
const appStore = useAppStore();
const usersStore = useUsersStore();
const bucketsStore = useBucketsStore();
const route = useRoute();
const router = useRouter();
Expand Down Expand Up @@ -420,8 +416,6 @@ async function onProjectSelected(project: Project): Promise<void> {
},
});
}
bucketsStore.clearS3Data();
}
onBeforeMount(() => {
Expand Down

0 comments on commit 5199e15

Please sign in to comment.