Merged in test-AIO (pull request #1443)
Resolve instance conflict for promanager.
This commit is contained in:
@@ -312,7 +312,14 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
|||||||
|
|
||||||
const user = yield select((state) => state.user.currentUser);
|
const user = yield select((state) => state.user.currentUser);
|
||||||
if (payload.features.singleDeviceOnly) {
|
if (payload.features.singleDeviceOnly) {
|
||||||
if (!(user.email.includes("@imex.") || user.email.includes("@rome.") || user.email.includes("@promanager.")))
|
if (
|
||||||
|
!(
|
||||||
|
user.email.includes("@imex.") ||
|
||||||
|
user.email.includes("@rome.") ||
|
||||||
|
user.email.includes("@rometech.") ||
|
||||||
|
user.email.includes("@promanager.")
|
||||||
|
)
|
||||||
|
)
|
||||||
yield put(setInstanceId(user.uid));
|
yield put(setInstanceId(user.uid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,11 +331,17 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
|||||||
rome: () => {
|
rome: () => {
|
||||||
if (
|
if (
|
||||||
payload.imexshopid.toLowerCase().startsWith("pm_") &&
|
payload.imexshopid.toLowerCase().startsWith("pm_") &&
|
||||||
!(user.email.includes("@imex.") || user.email.includes("@rome.") || user.email.includes("@promanager."))
|
!(
|
||||||
|
user.email.includes("@imex.") ||
|
||||||
|
user.email.includes("@rome.") ||
|
||||||
|
user.email.includes("@rometech.") ||
|
||||||
|
user.email.includes("@promanager.")
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
throw new Error("You are not authorized to use this application.");
|
throw new Error("You are not authorized to use this application.");
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
promanager: () => {}
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
yield put(setInstanceConflict());
|
yield put(setInstanceConflict());
|
||||||
|
|||||||
Reference in New Issue
Block a user