Skip to content

Commit

Permalink
✨ Voter eligibility check (#405)
Browse files Browse the repository at this point in the history
Parent issue: sequentech/meta#234
  • Loading branch information
Findeton authored Jul 23, 2024
1 parent d169dbd commit 50c5b4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion avRegistration/login-directive/login-directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_authevent && scope.base_authevent.force_census_query)) ? '/eligibility' : '/vote';
if (scope.isAdmin)
{
Authmethod.getUserInfo()
Expand Down
1 change: 1 addition & 0 deletions avUi/election-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion dist/appCommon-v10.4.2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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_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",
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 50c5b4c

Please sign in to comment.