Skip to content

Commit

Permalink
fix: auth renewal should not reset a selected project
Browse files Browse the repository at this point in the history
KK-1197.
A default project should not be set as an active by an auth renewal process
when a project is already selected.
  • Loading branch information
nikomakela committed Jul 5, 2024
1 parent c7d35b3 commit c7888bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/domain/authentication/authorizationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ export class AuthorizationService {
const projects = ProjectList((data as any)?.projects).items;
const role = projects.length > 0 ? 'admin' : 'none';
const projectPermissions = getProjectPermissions(projects);
projectService.setDefaultProjectId(projects);
if (!projectService.projectId) {
projectService.setDefaultProjectId(projects);
}
this.setPermissionStorage({ role, projects: projectPermissions });
} catch (error) {
// eslint-disable-next-line no-console
Expand Down

0 comments on commit c7888bf

Please sign in to comment.