Skip to content

Commit

Permalink
Merge pull request #356 from kpi-ua/use-mocked-modules
Browse files Browse the repository at this point in the history
  • Loading branch information
a-gubskiy authored Jan 31, 2025
2 parents 4164d74 + 64daaba commit 5e64037
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CampusClient.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ApplicationConfiguration from './ApplicationConfiguration';
import * as Security from './Security';

/**
* Application configuration
Expand Down Expand Up @@ -150,6 +151,15 @@ export const getCurrentUser = async (ignoreCache) => {
const user = await response.json();

if (!!user) {
user.modules = [
Security.Modules.Information,
Security.Modules.PersonalArea,
];

if (!!user.studentProfile) {
user.modules.push(Security.Modules.EmploymentSystem);
}

localStorage.setItem(cachedUserInfoKey, JSON.stringify(user));
}

Expand Down

0 comments on commit 5e64037

Please sign in to comment.