Skip to content

Commit c7888bf

Browse files
committed
fix: auth renewal should not reset a selected project
KK-1197. A default project should not be set as an active by an auth renewal process when a project is already selected.
1 parent c7d35b3 commit c7888bf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/domain/authentication/authorizationService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ export class AuthorizationService {
7272
const projects = ProjectList((data as any)?.projects).items;
7373
const role = projects.length > 0 ? 'admin' : 'none';
7474
const projectPermissions = getProjectPermissions(projects);
75-
projectService.setDefaultProjectId(projects);
75+
if (!projectService.projectId) {
76+
projectService.setDefaultProjectId(projects);
77+
}
7678
this.setPermissionStorage({ role, projects: projectPermissions });
7779
} catch (error) {
7880
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)