From 4c55b7fecaff9edb54ccf8b7480f21ae784e0b39 Mon Sep 17 00:00:00 2001 From: Findeton Date: Fri, 19 Jul 2024 15:34:30 -0500 Subject: [PATCH 1/3] wip --- avRegistration/login-directive/login-directive.js | 2 +- dist/appCommon-v10.4.2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/avRegistration/login-directive/login-directive.js b/avRegistration/login-directive/login-directive.js index 54731c28..8f53b12a 100644 --- a/avRegistration/login-directive/login-directive.js +++ b/avRegistration/login-directive/login-directive.js @@ -691,7 +691,7 @@ angular.module('avRegistration') $cookies.put("auth" + postfix, authToken, options); $cookies.put("isAdmin" + postfix, scope.isAdmin, options); Authmethod.setAuth(authToken, scope.isAdmin, autheventid); - var votingScreenPath = scope.isQuery ? '/eligibility' : '/vote'; + var votingScreenPath = (scope.isQuery || scope.base_auth.force_census_query) ? '/eligibility' : '/vote'; if (scope.isAdmin) { Authmethod.getUserInfo() diff --git a/dist/appCommon-v10.4.2.js b/dist/appCommon-v10.4.2.js index a1a7ead4..4ba89630 100644 --- a/dist/appCommon-v10.4.2.js +++ b/dist/appCommon-v10.4.2.js @@ -624,7 +624,7 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist $cookies.put("authevent_" + autheventid, autheventid, options), $cookies.put("userid" + postfix, tokens.data.username, options), $cookies.put("user" + postfix, scope.email || tokens.data.username || tokens.data.email, options), $cookies.put("auth" + postfix, decodedAccessToken, options), $cookies.put("isAdmin" + postfix, scope.isAdmin, options), - Authmethod.setAuth(decodedAccessToken, scope.isAdmin, autheventid), votingScreenPath = scope.isQuery ? "/eligibility" : "/vote", + Authmethod.setAuth(decodedAccessToken, scope.isAdmin, autheventid), votingScreenPath = scope.isQuery || scope.base_auth.force_census_query ? "/eligibility" : "/vote", scope.isAdmin ? Authmethod.getUserInfo().then(function(response) { var redirectUrl = $window.sessionStorage.getItem("redirect"); redirectUrl ? $window.sessionStorage.removeItem("redirect") : redirectUrl = "/admin/elections", From 8dd7c5b37b6b883b03823c4c2bc102c417a3fb9d Mon Sep 17 00:00:00 2001 From: Findeton Date: Fri, 19 Jul 2024 15:55:32 -0500 Subject: [PATCH 2/3] wip --- avRegistration/login-directive/login-directive.js | 2 +- dist/appCommon-v10.4.2.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/avRegistration/login-directive/login-directive.js b/avRegistration/login-directive/login-directive.js index 8f53b12a..c31ae131 100644 --- a/avRegistration/login-directive/login-directive.js +++ b/avRegistration/login-directive/login-directive.js @@ -691,7 +691,7 @@ angular.module('avRegistration') $cookies.put("auth" + postfix, authToken, options); $cookies.put("isAdmin" + postfix, scope.isAdmin, options); Authmethod.setAuth(authToken, scope.isAdmin, autheventid); - var votingScreenPath = (scope.isQuery || scope.base_auth.force_census_query) ? '/eligibility' : '/vote'; + var votingScreenPath = (scope.isQuery || (scope.base_authevent && scope.base_authevent.force_census_query)) ? '/eligibility' : '/vote'; if (scope.isAdmin) { Authmethod.getUserInfo() diff --git a/dist/appCommon-v10.4.2.js b/dist/appCommon-v10.4.2.js index 4ba89630..047e73ee 100644 --- a/dist/appCommon-v10.4.2.js +++ b/dist/appCommon-v10.4.2.js @@ -624,7 +624,7 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist $cookies.put("authevent_" + autheventid, autheventid, options), $cookies.put("userid" + postfix, tokens.data.username, options), $cookies.put("user" + postfix, scope.email || tokens.data.username || tokens.data.email, options), $cookies.put("auth" + postfix, decodedAccessToken, options), $cookies.put("isAdmin" + postfix, scope.isAdmin, options), - Authmethod.setAuth(decodedAccessToken, scope.isAdmin, autheventid), votingScreenPath = scope.isQuery || scope.base_auth.force_census_query ? "/eligibility" : "/vote", + Authmethod.setAuth(decodedAccessToken, scope.isAdmin, autheventid), votingScreenPath = scope.isQuery || scope.base_authevent && scope.base_authevent.force_census_query ? "/eligibility" : "/vote", scope.isAdmin ? Authmethod.getUserInfo().then(function(response) { var redirectUrl = $window.sessionStorage.getItem("redirect"); redirectUrl ? $window.sessionStorage.removeItem("redirect") : redirectUrl = "/admin/elections", From 2e95f253302851c7ee15e955adcb846ca8d54858 Mon Sep 17 00:00:00 2001 From: Findeton Date: Fri, 19 Jul 2024 16:34:33 -0500 Subject: [PATCH 3/3] wip --- avUi/election-creation.js | 1 + dist/appCommon-v10.4.2.js | 1 + 2 files changed, 2 insertions(+) diff --git a/avUi/election-creation.js b/avUi/election-creation.js index 74257011..084d58fa 100644 --- a/avUi/election-creation.js +++ b/avUi/election-creation.js @@ -44,6 +44,7 @@ angular.module('avUi') num_successful_logins_allowed: el.num_successful_logins_allowed, scheduled_events: el.scheduled_events || null, allow_public_census_query: el.allow_public_census_query, + force_census_query: el.force_census_query || false, hide_default_login_lookup_field: el.hide_default_login_lookup_field, parent_id: el.parent_id || null, children_election_info: el.children_election_info || null, diff --git a/dist/appCommon-v10.4.2.js b/dist/appCommon-v10.4.2.js index 047e73ee..ba3dd8ca 100644 --- a/dist/appCommon-v10.4.2.js +++ b/dist/appCommon-v10.4.2.js @@ -1571,6 +1571,7 @@ angular.module("avRegistration").config(function() {}), angular.module("avRegist num_successful_logins_allowed: el.num_successful_logins_allowed, scheduled_events: el.scheduled_events || null, allow_public_census_query: el.allow_public_census_query, + force_census_query: el.force_census_query || !1, hide_default_login_lookup_field: el.hide_default_login_lookup_field, parent_id: el.parent_id || null, children_election_info: el.children_election_info || null,