Skip to content

Commit

Permalink
Merge pull request #3 from virtualidentityag/fix-remove-user-roles
Browse files Browse the repository at this point in the history
fix: Remove unused user roles
  • Loading branch information
amannn authored Apr 14, 2021
2 parents bfea142 + cae97b6 commit 6377c90
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion cypress/fixtures/api.v1.login.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"status": "offline",
"active": true,
"_updatedAt": "2020-11-24T14:00:59.026Z",
"roles": ["user"],
"customFields": {},
"statusConnection": "offline",
"avatarUrl": "http://caritas/avatarUrl",
Expand Down
1 change: 0 additions & 1 deletion cypress/fixtures/service.users.data.askers.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"email": null,
"absenceMessage": null,
"agencies": null,
"userRoles": ["offline_access", "uma_authorization", "user"],
"grantedAuthorities": ["AUTHORIZATION_USER_DEFAULT"],
"consultingTypes": {
"0": { "sessionData": null, "isRegistered": false, "agency": null },
Expand Down
1 change: 0 additions & 1 deletion cypress/fixtures/service.users.data.consultants.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"consultingType": 0
}
],
"userRoles": ["consultant"],
"grantedAuthorities": ["AUTHORIZATION_CONSULTANT_DEFAULT"],
"consultingTypes": null,
"formalLanguage": true,
Expand Down
1 change: 0 additions & 1 deletion src/generated/userservice.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ declare namespace UserService {
*/
isInTeamAgency?: boolean;
agencies?: AgencyDTO[];
userRoles?: string[];
grantedAuthorities?: string[];
consultingTypes?: ConsultingTypeMap;
}
Expand Down
1 change: 0 additions & 1 deletion src/globalState/globalState_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"teamAgency": false
}
],
"userRoles": ["string"],
"grantedAuthorities": ["string"]
}
```
Expand Down
13 changes: 0 additions & 13 deletions src/globalState/helpers/stateHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ import {
} from '../../components/session/sessionHelpers';
import { translate } from '../../resources/scripts/i18n/translate';

export const USER_ROLES = {
USER: 'user',
CONSULTANT: 'consultant',
U25_CONSULTANT: 'u25-consultant',
U25_MAIN_CONSULTANT: 'u25-main-consultant',
KREUZBUND_CONSULTANT: 'kreuzbund-consultant'
};

export const isUserRole = (
role: string,
userData: UserDataInterface
): boolean => userData.userRoles.includes(role);

export const ACTIVE_SESSION = {
CREATE_CHAT: 'CREATE_CHAT'
};
Expand Down
1 change: 0 additions & 1 deletion src/globalState/interfaces/UserDataInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface UserDataInterface {
lastName?: string;
userId: string;
userName: string;
userRoles: [string];
}

export interface AgencyDataInterface {
Expand Down

0 comments on commit 6377c90

Please sign in to comment.