Skip to content
Snippets Groups Projects
Commit b9151bea authored by Sasha Ilieva's avatar Sasha Ilieva
Browse files

Add user blocked status

parent 03c54ea3
Branches
Tags
1 merge request!85351 employee account status
export const STATUS_DEVICE_REVOKED = "Device revoked";
export const STATUS_USER_NOT_ACTIVATED = 'User not activated';
export const STATUS_USER_NOT_ACTIVATED = "User not activated";
export const STATUS_USER_BLOCKED = "User blocked";
......@@ -37,7 +37,8 @@ import CryptoData from "../CryptoData";
import Identity from "../Identity";
import {
STATUS_DEVICE_REVOKED,
STATUS_USER_NOT_ACTIVATED
STATUS_USER_NOT_ACTIVATED,
STATUS_USER_BLOCKED
} from "../constants/statuses";
import generateQrCode from "../utilities/generateQrCode";
......@@ -323,12 +324,12 @@ async function executeRestfulFunction(type, that, fn, config, ...args) {
const userNotActivated =
type === "private" &&
code === "400" &&
status === STATUS_USER_NOT_ACTIVATED;
(status === STATUS_USER_NOT_ACTIVATED || status === STATUS_USER_BLOCKED);
if (userNotActivated) {
destroyIdentity();
const event = createEvent("", "UserNotActivated");
const event = createEvent("", "UserBlocked");
iframeParent.onEvent(event);
return response.data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment