-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from SailingSteve/steveStaffClientFeb15-9am
Added PermissionsAdministration.
- Loading branch information
Showing
16 changed files
with
953 additions
and
585 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
// eslint-disable-next-line import/no-cycle | ||
import AppObservableStore from '../stores/AppObservableStore'; | ||
import Cookies from '../common/utils/js-cookie/Cookies'; | ||
import stringContains from '../common/utils/stringContains'; | ||
|
||
export default { | ||
voterSignOut (signOutAllDevices = false) { | ||
AppObservableStore.setShowSignInModal(false); | ||
AppObservableStore.unsetStoreSignInStartFullUrl(); | ||
Dispatcher.loadEndpoint('voterSignOut', { sign_out_all_devices: signOutAllDevices }); | ||
const names = [ | ||
'voter_device_id', | ||
'ballot_has_been_visited', | ||
'location_guess_closed', | ||
'number_of_ballot_choices_made', | ||
'number_of_topic_choices_made', | ||
'show_full_navigation', | ||
'sign_in_opened_from_issue_follow', | ||
'sign_in_start_full_url', | ||
]; | ||
for (let i = 0; i < names.length; i++) { | ||
const name = names[i]; | ||
Cookies.remove(name); | ||
Cookies.remove(name, { path: '/' }); | ||
Cookies.remove(name, { path: '/', domain: 'wevote.us' }); | ||
} | ||
}, | ||
|
||
setVoterDeviceIdCookie (id) { | ||
let { hostname } = window.location; | ||
hostname = hostname || ''; | ||
console.log('VoterSessionActions setVoterDeviceIdCookie hostname:', hostname); | ||
if (hostname && stringContains('wevote.us', hostname)) { | ||
// If hanging off WeVote subdomain, store the cookie with top level domain | ||
Cookies.set('voter_device_id', id, { expires: 10000, path: '/', domain: 'wevote.us' }); | ||
} else { | ||
Cookies.set('voter_device_id', id, { expires: 10000, path: '/' }); | ||
} | ||
}, | ||
}; | ||
// import Dispatcher from '../common/dispatcher/Dispatcher'; | ||
// // eslint-disable-next-line import/no-cycle | ||
// import AppObservableStore from '../stores/AppObservableStore'; | ||
// import Cookies from '../common/utils/js-cookie/Cookies'; | ||
// import stringContains from '../common/utils/stringContains'; | ||
// | ||
// export default { | ||
// voterSignOut (signOutAllDevices = false) { | ||
// AppObservableStore.setShowSignInModal(false); | ||
// AppObservableStore.unsetStoreSignInStartFullUrl(); | ||
// Dispatcher.loadEndpoint('voterSignOut', { sign_out_all_devices: signOutAllDevices }); | ||
// const names = [ | ||
// 'voter_device_id', | ||
// 'ballot_has_been_visited', | ||
// 'location_guess_closed', | ||
// 'number_of_ballot_choices_made', | ||
// 'number_of_topic_choices_made', | ||
// 'show_full_navigation', | ||
// 'sign_in_opened_from_issue_follow', | ||
// 'sign_in_start_full_url', | ||
// ]; | ||
// for (let i = 0; i < names.length; i++) { | ||
// const name = names[i]; | ||
// Cookies.remove(name); | ||
// Cookies.remove(name, { path: '/' }); | ||
// Cookies.remove(name, { path: '/', domain: 'wevote.us' }); | ||
// } | ||
// }, | ||
// | ||
// setVoterDeviceIdCookie (id) { | ||
// let { hostname } = window.location; | ||
// hostname = hostname || ''; | ||
// console.log('VoterSessionActions setVoterDeviceIdCookie hostname:', hostname); | ||
// if (hostname && stringContains('wevote.us', hostname)) { | ||
// // If hanging off WeVote subdomain, store the cookie with top level domain | ||
// Cookies.set('voter_device_id', id, { expires: 10000, path: '/', domain: 'wevote.us' }); | ||
// } else { | ||
// Cookies.set('voter_device_id', id, { expires: 10000, path: '/' }); | ||
// } | ||
// }, | ||
// }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const SearchBarWrapper = styled('div')` | ||
margin-bottom: 16px; | ||
display: flex; | ||
`; | ||
|
||
export const MatchingPerson = styled('div')` | ||
margin: 10px 0 0 10px; | ||
font-style: italic; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
export const clearSignedInGlobals = (setAppContextValue) => { | ||
setAppContextValue('authenticatedPerson', undefined); | ||
setAppContextValue('authenticatedPersonId', -1); | ||
setAppContextValue('isAuthenticated', false); | ||
setAppContextValue('loggedInPersonIsAdmin', false); | ||
setAppContextValue('personIsSignedIn', false); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.