Commit dfc38728 authored by Tristan A Spakes's avatar Tristan A Spakes

ver. 1.3.3 Added error for when no user is selected for temp MFA registration....

ver. 1.3.3 Added error for when no user is selected for temp MFA registration. Attempts made to get temp MFA registration working completely, must push to test due to pathing
parent fa8bcb9c
Pipeline #26102 passed with stages
in 1 minute
......@@ -7,20 +7,27 @@ const remote = require('electron').remote
function tempMFARegistration() {
ipcRenderer.send('log', 'ORNL Toolbox: Submitted MFA temporary registration request', 'info')
uid = document.getElementById('tempMFARegistrationUserSelect').value
dropdown = document.getElementById('tempMFARegistrationUserSelect')
uid = dropdown.options[dropdown.selectedIndex].text
if(uid == "User") {
alert('Please select a user')
ipcRenderer.send('log', 'ORNL Toolbox: No user selected - request aborted', 'err')
return
}
try { //Check for entry in digest mapping file
var path = remote.app.getPath('exe') //Grabs the path to the executable
path = path.substring(0, path.length - 11) + 'resources/app/badgeManagement/tempMFARegistration/tempMFARegistration.bash'
alert('Please insert an unregistered smart card before proceeding. Ensure it is the only smart card plugged in.')
checkSmartCard()
//Grab the unregistered smart card mapping to be added
var entry = execSync(`echo "${uid}\"" | cat ${path} - | tr '\n' ' ' | bash`, (error, stdout, stderr) => {})
var entry = execSync(`echo ${uid}\" | cat ${path} - | tr '\n' ' ' | bash`, (error, stdout, stderr) => {})
alert('Please remove the unregistered smart card and then insert a registered smart card. Ensure it is the only smart card plugged in.')
checkSmartCard()
execSync(`pkexec echo ${entry} >> /etc/pam_pkcs11/digest_mapping`, () => {})
} catch(error) {
error = error.toString()
console.error(error)
console.log(error)
alert('An error occured during the registration process')
ipcRenderer.send('log', 'ORNL Toolbox: An error occured during the registration process - request aborted', 'err')
return
......
......@@ -6,7 +6,7 @@ if [[ ${CI_COMMIT_REF_NAME} == 'master' ]]; then
else
BRANCH="-${CI_COMMIT_REF_NAME}"
fi
VERSION_NUMBER='1.3.2'
VERSION_NUMBER='1.3.3'
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum -y install nodejs npm ruby-devel gcc make rpm-build rubygems
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment