diff --git a/src/pages/Home.vue b/src/pages/Home.vue index 2597633..bfe21d0 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -459,7 +459,7 @@ export default { * If sessionId exists in route, then retrieve session details. Otherwise, fallback to using group data. */ if (this.sessionId != "") { - if (this.sessionId.startsWith("CD_Hiring") || this.sessionId.startsWith("AFTesting") || this.sessionId.startsWith("PunjabTeachers") || this.sessionId.startsWith("Candidates")) { + if (this.sessionId.startsWith("CD_Hiring") || this.sessionId.startsWith("PunjabTeachers") || this.sessionId.startsWith("Candidates")) { this.oldFlow = true; this.sessionData = await sessionAPIService.getOldSessionData(this.sessionId); } else { diff --git a/src/pages/NewSignin.vue b/src/pages/NewSignin.vue index 15a5caf..d9d0646 100644 --- a/src/pages/NewSignin.vue +++ b/src/pages/NewSignin.vue @@ -383,6 +383,13 @@ export default { * @returns {Promise} A Promise that resolves once the authentication process is complete. */ async authenticate() { + var TESTING_MODE = false; + if (this.$store.state.authGroupData.name == "AFTesting") { + TESTING_MODE = true; + // authenticate all userIds as valid + // do not send logs to afdb + } + let isUserValid = await validateUser( this.auth_type, this.userInformation, @@ -390,6 +397,8 @@ export default { this.$store.state.authGroupData.id ); + if (TESTING_MODE == true) isUserValid.isUserIdValid = true; + var userId = ""; if (this.auth_type.includes("ID") && !isUserValid.isUserIdValid) { this.invalidLoginMessage = @@ -431,13 +440,16 @@ export default { } if (this.enable_pop_up_form) { - await UserAPI.postUserSessionActivity( - this.userInformation["student_id"], - "sign-in", - this.$store.state.sessionData.session_id, - this.$store.state.authGroupData.input_schema.user_type, - this.$store.state.sessionData.session_occurrence_id - ); + if (this.$store.state.sessionData.session_id != null && TESTING_MODE == false) { + await UserAPI.postUserSessionActivity( + this.userInformation["student_id"], + "sign-in", + this.$store.state.sessionData.session_id, + this.$store.state.authGroupData.input_schema.user_type, + this.$store.state.sessionData.session_occurrence_id + ); + } + await sendSQSMessage( "sign-in", this.sub_type, @@ -459,8 +471,8 @@ export default { ); this.$router.push(`/form/${this.userInformation["student_id"]}`); } else { - if (this.$store.state.sessionData.session_id != null) { - // do not send logs for reports, gurukul + if (this.$store.state.sessionData.session_id != null && TESTING_MODE == false) { + // do not send logs for reports, gurukul, testing_mode await UserAPI.postUserSessionActivity( userId, this.$store.state.sessionData.type,