Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
8d516bbc
Commit
8d516bbc
authored
Mar 19, 2019
by
Nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Email ingest feature
parent
06b98d82
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
232 additions
and
80 deletions
+232
-80
Candidate.xml
cmsWebApp/sql/Candidate.xml
+3
-0
Candidate.sql
cmsWebApp/sql/ms/Candidate.sql
+3
-0
Candidate.sql
cmsWebApp/sql/oracle/Candidate.sql
+3
-0
Candidate.sql
cmsWebApp/sql/postgres/Candidate.sql
+3
-0
SendVerificationMailFP.java
cmsWebApp/src/performa/form/SendVerificationMailFP.java
+31
-50
BaseCandidate.java
cmsWebApp/src/performa/orm/BaseCandidate.java
+0
-0
Candidate.java
cmsWebApp/src/performa/orm/Candidate.java
+8
-0
Candidate.xml
cmsWebApp/src/performa/orm/Candidate.xml
+7
-0
CandidatePersistenceMgr.java
cmsWebApp/src/performa/orm/CandidatePersistenceMgr.java
+0
-0
JobApplication.java
cmsWebApp/src/performa/orm/JobApplication.java
+2
-2
PerformaEmailFetcher.java
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
+0
-0
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+77
-1
CustomServlets_applicantPortal.xml
...nsions/applicantportal/CustomServlets_applicantPortal.xml
+1
-0
password_page.jsp
...bApp/webroot/extensions/applicantportal/password_page.jsp
+14
-3
20190318_Alter_Candidate.xml
...ons/applicantportal/upgrades/20190318_Alter_Candidate.xml
+16
-0
verify_identity.jsp
...pp/webroot/extensions/applicantportal/verify_identity.jsp
+56
-19
GeneralConfig_performa.xml
...pp/webroot/extensions/performa/GeneralConfig_performa.xml
+6
-3
stdimports.jsp
cmsWebApp/webroot/extensions/performa/inc/stdimports.jsp
+2
-2
No files found.
cmsWebApp/sql/Candidate.xml
View file @
8d516bbc
...
...
@@ -16,6 +16,9 @@
<column
name=
"verification_key"
type=
"String"
nullable=
"true"
length=
"10"
/>
<column
name=
"is_account_verified"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"google_address_text"
type=
"String"
nullable=
"true"
length=
"300"
/>
<column
name=
"is_email_ingest"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"is_masked_email"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"known_as_alias"
type=
"String"
nullable=
"true"
length=
"100"
/>
<column
name=
"test_input_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
<column
name=
"user_id"
type=
"Long"
length=
"11"
nullable=
"true"
/>
</NODE>
...
...
cmsWebApp/sql/ms/Candidate.sql
View file @
8d516bbc
...
...
@@ -15,6 +15,9 @@ CREATE TABLE oneit_sec_user_extension (
verification_key
varchar
(
10
)
NULL
,
is_account_verified
char
(
1
)
NULL
,
google_address_text
varchar
(
300
)
NULL
,
is_email_ingest
char
(
1
)
NULL
,
is_masked_email
char
(
1
)
NULL
,
known_as_alias
varchar
(
100
)
NULL
,
test_input_id
numeric
(
12
)
NULL
,
user_id
numeric
(
12
)
NULL
);
...
...
cmsWebApp/sql/oracle/Candidate.sql
View file @
8d516bbc
...
...
@@ -16,6 +16,9 @@ CREATE TABLE oneit_sec_user_extension (
verification_key
varchar2
(
10
)
NULL
,
is_account_verified
char
(
1
)
NULL
,
google_address_text
varchar2
(
300
)
NULL
,
is_email_ingest
char
(
1
)
NULL
,
is_masked_email
char
(
1
)
NULL
,
known_as_alias
varchar2
(
100
)
NULL
,
test_input_id
number
(
12
)
NULL
,
user_id
number
(
12
)
NULL
);
...
...
cmsWebApp/sql/postgres/Candidate.sql
View file @
8d516bbc
...
...
@@ -16,6 +16,9 @@ CREATE TABLE oneit_sec_user_extension (
verification_key
varchar
(
10
)
NULL
,
is_account_verified
char
(
1
)
NULL
,
google_address_text
varchar
(
300
)
NULL
,
is_email_ingest
char
(
1
)
NULL
,
is_masked_email
char
(
1
)
NULL
,
known_as_alias
varchar
(
100
)
NULL
,
test_input_id
numeric
(
12
)
NULL
,
user_id
numeric
(
12
)
NULL
);
...
...
cmsWebApp/src/performa/form/SendVerificationMailFP.java
View file @
8d516bbc
package
performa
.
form
;
import
java.util.Date
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
oneit.business.content.Article
;
import
oneit.components.ParticipantInitialisationContext
;
import
oneit.email.ConfigurableArticleTemplateEmailer
;
import
oneit.email.ConfigurableEmailerException
;
import
oneit.logging.*
;
import
oneit.net.LoopbackHTTP
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.parser.BusinessObjectParser
;
...
...
@@ -19,13 +15,13 @@ import oneit.utils.*;
import
performa.orm.*
;
import
performa.orm.types.RoleType
;
import
performa.utils.Utils
;
import
performa.utils.WebUtils
;
public
class
SendVerificationMailFP
extends
SaveFP
{
private
static
final
LoggingArea
LOG
=
LoggingArea
.
createLoggingArea
(
"SendVerificationLink"
);
protected
ConfigurableArticleTemplateEmailer
emailer
;
protected
ConfigurableArticleTemplateEmailer
emailChangedMailer
;
@Override
...
...
@@ -55,7 +51,7 @@ public class SendVerificationMailFP extends SaveFP
BusinessObjectParser
.
assertFieldCondition
(
secUser
.
getEmail
()
!=
null
,
job
,
Job
.
FIELD_Email
,
"mandatory"
,
exceptions
,
true
,
request
);
BusinessObjectParser
.
assertFieldCondition
(
StringUtils
.
isEmailAddress
(
secUser
.
getEmail
()),
job
,
Job
.
FIELD_Email
,
"invalid"
,
exceptions
,
true
,
request
);
BusinessObjectParser
.
assertFieldCondition
(
secUser
.
getFirstName
()
!=
null
,
secUser
,
SecUser
.
FIELD_FirstName
,
"mandatory"
,
exceptions
,
true
,
request
);
BusinessObjectParser
.
assertFieldCondition
(
secUser
.
getLastName
()
!=
null
,
secUser
,
SecUser
.
FIELD_LastName
,
"mandatory"
,
exceptions
,
true
,
request
);
...
...
@@ -133,9 +129,34 @@ public class SendVerificationMailFP extends SaveFP
}
else
{
sendVerificationMail
(
candidate
,
job
,
request
);
if
(
candidate
.
isTrue
(
candidate
.
getIsEmailIngest
()))
{
if
(
candidate
.
isTrue
(
candidate
.
getIsMaskedEmail
()))
{
SecUser
old
=
(
SecUser
)
candidate
.
getUser
().
getEarliestBackup
();
if
(
CollectionUtils
.
equals
(
old
.
getEmail
(),
candidate
.
getUser
().
getEmail
()))
{
throw
new
BusinessException
(
"Please enter a valid email address"
);
}
// send email changed mail
Utils
.
sendMaskedEmailChangedMail
(
candidate
,
job
,
emailChangedMailer
);
candidate
.
getUser
().
setUserName
(
candidate
.
getUser
().
getEmail
());
candidate
.
setIsMaskedEmail
(
false
);
candidate
.
setKnownAsAlias
(
old
.
getEmail
());
}
else
{
candidate
.
setIsAccountVerified
(
true
);
}
}
else
{
Utils
.
sendVerificationMail
(
candidate
,
job
,
emailer
,
SendVerificationMailFP
.
class
.
getName
());
}
request
.
setAttribute
(
"nextPage"
,
request
.
getAttribute
(
"nextPage"
)
+
"&JobID="
+
job
.
getID
());
}
return
super
.
processForm
(
process
,
submission
,
params
);
...
...
@@ -148,47 +169,6 @@ public class SendVerificationMailFP extends SaveFP
super
.
init
(
context
);
emailer
=
(
ConfigurableArticleTemplateEmailer
)
(
context
.
getSingleChild
(
"AccountVerificationEmailer"
));
}
private
void
sendVerificationMail
(
Candidate
candidate
,
Job
job
,
HttpServletRequest
request
)
throws
BusinessException
{
if
(!
candidate
.
isTrue
(
candidate
.
getIsAccountVerified
()))
{
try
{
LogMgr
.
log
(
LOG
,
LogLevel
.
PROCESSING1
,
"Sending verification mail from SendVerificationMailFP to :: "
,
candidate
);
Article
verificationArticle
=
WebUtils
.
getArticleByShortCut
(
candidate
.
getTransaction
(),
WebUtils
.
APPLICANT_ACCOUNT_VERIFICATION
);
RandomStringGen
random
=
new
RandomStringGen
();
//set verification key and send mail time
candidate
.
setVerificationKey
(
random
.
generateAlphaNum
(
6
));
candidate
.
setVerificationMailSendDate
(
new
Date
());
String
link
=
LoopbackHTTP
.
getRemoteAccessURL
(
request
)
+
verificationArticle
.
getLink
(
request
,
CollectionUtils
.
EMPTY_MAP
,
"/"
)
+
"?id="
+
job
.
getID
()
+
"&key="
+
job
.
getRandomKey
()
+
"&aid="
+
candidate
.
getID
()
+
"&pin="
+
candidate
.
getVerificationKey
();
Map
defaultParams
=
CollectionUtils
.
mapEntry
(
"link"
,
link
).
toMap
();
ObjectTransform
transform
=
Utils
.
createCompoundTransform
(
defaultParams
,
candidate
.
getUser
(),
job
);
Utils
.
sendMail
(
emailer
,
transform
,
new
String
[]{
candidate
.
getUser
().
getUserName
()},
null
,
candidate
);
LogMgr
.
log
(
LOG
,
LogLevel
.
PROCESSING1
,
"Sent verification mail successfully from "
+
SendVerificationMailFP
.
class
+
" to :: "
,
candidate
);
}
catch
(
ConfigurableEmailerException
ex
)
{
LogMgr
.
log
(
LOG
,
LogLevel
.
SYSTEMERROR1
,
ex
,
"Error occured while sending mail for Candidate :: "
+
candidate
);
throw
new
BusinessException
(
"We are unable to send mail. Please try again or contact Matchd for more details."
);
}
}
else
{
LogMgr
.
log
(
LOG
,
LogLevel
.
PROCESSING1
,
"Call from "
+
SendVerificationMailFP
.
class
+
". Account is already verified for candidate :: "
,
candidate
);
}
emailChangedMailer
=
(
ConfigurableArticleTemplateEmailer
)
(
context
.
getSingleChild
(
"EmailChangedEmailer"
));
}
}
\ No newline at end of file
cmsWebApp/src/performa/orm/BaseCandidate.java
View file @
8d516bbc
This diff is collapsed.
Click to expand it.
cmsWebApp/src/performa/orm/Candidate.java
View file @
8d516bbc
...
...
@@ -7,6 +7,7 @@ import java.util.Comparator;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.MessageSource
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.rdbms.filters.EqualsFilter
;
...
...
@@ -25,6 +26,7 @@ import performa.utils.ExpressAnswerFilter;
public
class
Candidate
extends
BaseCandidate
{
public
static
LoggingArea
LOG
=
LoggingArea
.
createLoggingArea
(
"Candidate"
);
private
static
final
long
serialVersionUID
=
0L
;
// This constructor should not be called
...
...
@@ -181,4 +183,9 @@ public class Candidate extends BaseCandidate
Distance
calculateDistance
=
DistanceUtils
.
calculateDistance
(
FIELD_Phone
,
FIELD_Phone
);
return
false
;
}
public
boolean
isUnverifiedEmailIngestUser
()
{
return
!
isTrue
(
getIsAccountVerified
())
&&
isTrue
(
getIsEmailIngest
());
}
}
\ No newline at end of file
cmsWebApp/src/performa/orm/Candidate.xml
View file @
8d516bbc
...
...
@@ -23,6 +23,9 @@
<ATTRIB
name=
"VerificationKey"
type=
"String"
dbcol=
"verification_key"
length=
"10"
/>
<ATTRIB
name=
"IsAccountVerified"
type=
"Boolean"
dbcol=
"is_account_verified"
defaultValue=
"Boolean.FALSE"
/>
<ATTRIB
name=
"GoogleAddressText"
type=
"String"
dbcol=
"google_address_text"
length=
"300"
/>
<ATTRIB
name=
"IsEmailIngest"
type=
"Boolean"
dbcol=
"is_email_ingest"
defaultValue=
"Boolean.FALSE"
/>
<ATTRIB
name=
"IsMaskedEmail"
type=
"Boolean"
dbcol=
"is_masked_email"
defaultValue=
"Boolean.FALSE"
/>
<ATTRIB
name=
"KnownAsAlias"
type=
"String"
dbcol=
"known_as_alias"
length=
"100"
/>
<SINGLEREFERENCE
name=
"TestInput"
type=
"TestInput"
dbcol=
"test_input_id"
backreferenceName=
"Candidates"
/>
<SINGLEREFERENCE
name=
"User"
type=
"SecUser"
dbcol=
"user_id"
backreferenceName=
"Extensions"
inSuper=
'TRUE'
/>
...
...
@@ -31,6 +34,10 @@
<SEARCH
type=
"All"
paramFilter=
"oneit_sec_user_extension.object_id is not null"
>
</SEARCH>
<SEARCH
type=
"Alias"
filter=
"known_as_alias = ?"
polymorphic=
"TRUE"
singleton=
"TRUE"
>
<PARAM
name=
"KnownAs"
type=
"String"
/>
</SEARCH>
<SEARCH
type=
"IdPin"
paramFilter=
"oneit_sec_user_extension.object_id is not null"
singleton=
"TRUE"
>
<PARAM
name=
"ID"
type=
"Long"
paramFilter=
"object_id = ${ID} "
/>
<PARAM
name=
"Pin"
type=
"String"
paramFilter=
"verification_key = ${Pin}"
/>
...
...
cmsWebApp/src/performa/orm/CandidatePersistenceMgr.java
View file @
8d516bbc
This diff is collapsed.
Click to expand it.
cmsWebApp/src/performa/orm/JobApplication.java
View file @
8d516bbc
...
...
@@ -105,14 +105,14 @@ public class JobApplication extends BaseJobApplication
if
(
getCV
()
!=
null
)
{
String
contentType
=
getCV
().
getContentType
();
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"opendocument.text"
)
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"
doc"
)
||
contentType
.
contains
(
"docx"
)
||
contentType
.
contains
(
"
opendocument.text"
)
||
contentType
.
contains
(
"pdf"
)
||
contentType
.
contains
(
"vnd.openxmlformats-officedocument.wordprocessingml.document"
)
,
this
,
FIELD_CV
,
"invalid"
);
}
if
(
getCoverLetter
()
!=
null
)
{
String
contentType
=
getCoverLetter
().
getContentType
();
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"opendocument.text"
)
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"
doc"
)
||
contentType
.
contains
(
"docx"
)
||
contentType
.
contains
(
"
opendocument.text"
)
||
contentType
.
contains
(
"pdf"
)
||
contentType
.
contains
(
"vnd.openxmlformats-officedocument.wordprocessingml.document"
)
,
this
,
FIELD_CoverLetter
,
"invalid"
);
}
}
...
...
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
View file @
8d516bbc
This diff is collapsed.
Click to expand it.
cmsWebApp/src/performa/utils/Utils.java
View file @
8d516bbc
...
...
@@ -43,8 +43,8 @@ public class Utils
public
static
final
String
PRIV_ACCESS_APPLICANT_PORTAL
=
"TL_AccessApplicantPortal"
;
public
static
final
String
PRIV_ACCESS_COMPANY_ADMIN
=
"TL_AccessCompanyAdmin"
;
public
static
final
String
PRIV_ACCESS_COMPANY
=
"TL_AccessCompany"
;
public
static
final
String
ADVT_CONFIG_EMAIL_EXTENSION
=
ConfigMgr
.
getKeyfileString
(
"advt.config.email.extension"
,
"matchdmail.com"
);
public
static
final
String
APPLICANT_VERIFY_LINK
=
"/ApplicantPortal-Applicant_Account_Verification.htm"
;
public
static
Role
getRole
(
String
role
,
ObjectTransaction
transaction
)
{
...
...
@@ -428,6 +428,48 @@ public class Utils
}
public
static
void
sendVerificationMail
(
Candidate
candidate
,
Job
job
,
ConfigurableArticleTemplateEmailer
emailer
,
String
callingClass
)
throws
BusinessException
{
if
(!
candidate
.
isTrue
(
candidate
.
getIsAccountVerified
()))
{
try
{
LogMgr
.
log
(
Candidate
.
LOG
,
LogLevel
.
PROCESSING1
,
"Sending verification mail from SendVerificationMailFP to :: "
,
candidate
);
RandomStringGen
random
=
new
RandomStringGen
();
//set verification key and send mail time
candidate
.
setVerificationKey
(
random
.
generateAlphaNum
(
6
));
candidate
.
setVerificationMailSendDate
(
new
Date
());
String
link
=
LoopbackHTTP
.
getRemoteAccessURL
()
+
APPLICANT_VERIFY_LINK
+
"?id="
+
job
.
getID
()
+
"&key="
+
job
.
getRandomKey
()
+
"&aid="
+
candidate
.
getID
()
+
"&pin="
+
candidate
.
getVerificationKey
();
Map
defaultParams
=
CollectionUtils
.
mapEntry
(
"link"
,
link
).
toMap
();
ObjectTransform
transform
=
Utils
.
createCompoundTransform
(
defaultParams
,
candidate
.
getUser
(),
job
);
Utils
.
sendMail
(
emailer
,
transform
,
new
String
[]{
candidate
.
getUser
().
getUserName
()},
null
,
candidate
);
LogMgr
.
log
(
Candidate
.
LOG
,
LogLevel
.
PROCESSING1
,
"Sent verification mail successfully from "
+
callingClass
+
" to :: "
,
candidate
);
}
catch
(
ConfigurableEmailerException
ex
)
{
LogMgr
.
log
(
Candidate
.
LOG
,
LogLevel
.
SYSTEMERROR1
,
ex
,
"Error occured while sending mail for Candidate :: "
+
candidate
);
throw
new
BusinessException
(
"We are unable to send mail. Please try again or contact Matchd for more details."
);
}
}
else
{
LogMgr
.
log
(
Candidate
.
LOG
,
LogLevel
.
PROCESSING1
,
"Call from "
+
callingClass
+
". Account is already verified for candidate :: "
,
candidate
);
}
}
public
static
void
sendVerificationMail
(
Job
job
,
CompanyUser
companyUser
,
HttpServletRequest
request
,
ConfigurableArticleTemplateEmailer
emailer
,
String
callingClass
)
throws
BusinessException
{
if
(!
CollectionUtils
.
equals
(
companyUser
.
getIsAccountVerified
(),
Boolean
.
TRUE
))
...
...
@@ -468,6 +510,40 @@ public class Utils
}
public
static
void
sendMaskedEmailChangedMail
(
Candidate
candidate
,
Job
job
,
ConfigurableArticleTemplateEmailer
emailer
)
throws
BusinessException
{
try
{
LogMgr
.
log
(
Candidate
.
LOG
,
LogLevel
.
PROCESSING1
,
"Sending masked email changed mail to :: "
,
candidate
);
RandomStringGen
random
=
new
RandomStringGen
();
//set verification key and send mail time
candidate
.
setVerificationKey
(
random
.
generateAlphaNum
(
6
));
candidate
.
setVerificationMailSendDate
(
new
Date
());
String
link
=
LoopbackHTTP
.
getRemoteAccessURL
()
+
APPLICANT_VERIFY_LINK
+
"?id="
+
job
.
getID
()
+
"&key="
+
job
.
getRandomKey
()
+
"&aid="
+
candidate
.
getID
()
+
"&pin="
+
candidate
.
getVerificationKey
();
Map
defaultParams
=
CollectionUtils
.
mapEntry
(
"link"
,
link
).
toMap
();
ObjectTransform
transform
=
Utils
.
createCompoundTransform
(
defaultParams
,
candidate
.
getUser
(),
job
);
Utils
.
sendMail
(
emailer
,
transform
,
new
String
[]{
candidate
.
getUser
().
getEmail
()},
null
,
candidate
);
LogMgr
.
log
(
CompanyUser
.
LOG
,
LogLevel
.
PROCESSING1
,
"Sent masked email changed mail successfully to :: "
,
candidate
);
}
catch
(
ConfigurableEmailerException
ex
)
{
LogMgr
.
log
(
CompanyUser
.
LOG
,
LogLevel
.
SYSTEMERROR1
,
ex
,
"Error occured while sending mail for user :: "
+
candidate
);
throw
new
BusinessException
(
"We are unable to send mail. Please try again or contact Matchd for more details."
);
}
}
public
static
void
sendEmailChangedMail
(
CompanyUser
companyUser
,
HttpServletRequest
request
,
ConfigurableArticleTemplateEmailer
emailer
,
String
callingClass
)
throws
BusinessException
{
if
(
companyUser
.
getIsEmailChanged
()==
Boolean
.
TRUE
)
...
...
cmsWebApp/webroot/extensions/applicantportal/CustomServlets_applicantPortal.xml
View file @
8d516bbc
...
...
@@ -13,6 +13,7 @@
<FORM
name=
"*.saveAndExitWorkStyle"
factory=
"Participant"
class=
"performa.form.SaveAndExitWorkStypeFP"
/>
<FORM
name=
"*.sendVerificationMail"
factory=
"Participant"
class=
"performa.form.SendVerificationMailFP"
>
<AccountVerificationEmailer
factory=
"Participant"
class=
"oneit.email.ConfigurableArticleTemplateEmailer"
templateShortcut=
"AccountVerificationMail"
/>
<EmailChangedEmailer
factory=
"Participant"
class=
"oneit.email.ConfigurableArticleTemplateEmailer"
templateShortcut=
"EmailChangedMail"
/>
</FORM>
<FORM
name=
"*.facebookOAuthLogin"
factory=
"Participant"
class=
"oneit.security.oauth.form.FacebookOAuthLoginFP"
/>
<FORM
name=
"*.googleOAuthLogin"
factory=
"Participant"
class=
"oneit.security.oauth.form.GoogleOAuthLoginFP"
/>
...
...
cmsWebApp/webroot/extensions/applicantportal/password_page.jsp
View file @
8d516bbc
...
...
@@ -53,9 +53,20 @@
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
Article applyJobArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.JOB_APPLICATION);
String nextPage = applyJobArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", job.getIncludeAssessmentCriteria() ? "SelectionCriteria" : "WorkplaceCulture").toMap());
Article applyJobArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.APPLY_JOB);
String confirmDetailsPage = LoopbackHTTP.getRemoteAccessURL(request)
+ applyJobArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "VerifyIdentity").toMap(), "/");
if(candidate.isUnverifiedEmailIngestUser() && candidate.getKnownAsAlias() == null)
{
request.getSession().setAttribute (SecUser.SEC_USER_ID, secUser);
request.getSession().setAttribute (SessionSecUserDecorator.REFRESH_SECURITY, Boolean.TRUE);
response.sendRedirect(confirmDetailsPage + "&JobID=" + job.getID().toString());
}
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
Article jobApplicationArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", job.getIncludeAssessmentCriteria() ? "SelectionCriteria" : "WorkplaceCulture").toMap());
process.setAttribute("JobApplication", jobApplication);
%>
...
...
cmsWebApp/webroot/extensions/applicantportal/upgrades/20190318_Alter_Candidate.xml
0 → 100644
View file @
8d516bbc
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS
name=
""
xmlns:oneit=
"http://www.1iT.com.au"
>
<NODE
name=
"Script"
factory=
"Vector"
>
<NODE
name=
"DDL"
factory=
"Participant"
class=
"oneit.sql.transfer.RedefineTableOperation"
>
<tableName
factory=
"String"
>
oneit_sec_user_extension
</tableName>
<column
name=
"is_email_ingest"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"is_masked_email"
type=
"Boolean"
nullable=
"true"
/>
<column
name=
"known_as_alias"
type=
"String"
nullable=
"true"
length=
"100"
/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
cmsWebApp/webroot/extensions/applicantportal/verify_identity.jsp
View file @
8d516bbc
...
...
@@ -5,23 +5,30 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran = process.getTransaction ();
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
Job job = (Job) process.getAttribute("Job");
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
Job job = (Job) process.getAttribute("Job");
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent");
SecUser secUser = null;
boolean toRedirect = false;
if(candidate != null)
SecUser secUser = SecUser.getTXUser(transaction);
if(candidate == null && secUser != null)
{
candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
}
if(secUser == null && candidate != null)
{
secUser = candidate.getUser();
process.setAttribute("NewCandidate", candidate);
}
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent") + "&JobID=" + job.getID();
String applyJobPage = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION).getLink(request) + "?JobID=" + job.getID();
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
if(jobApplication == null)
{
...
...
@@ -129,7 +136,20 @@
<div class="main-box-layout main-verify-step-2">
<div class="form-group text-left">
<label>Email Address</label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control second-style" disabled="true" readonly="true"/>
<%
if(candidate.isUnverifiedEmailIngestUser() && candidate.isTrue(candidate.getIsMaskedEmail()))
{
%>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" style="text-transform: lowercase" required="true"/>
<%
}
else
{
%>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control second-style" disabled="true" readonly="true"/>
<%
}
%>
</div>
<div class="form-group text-left email">
...
...
@@ -245,14 +265,31 @@
</div>
</div>
<div class="text-center">
<oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/>
<%
if(candidate.isUnverifiedEmailIngestUser() && !candidate.isTrue(candidate.getIsMaskedEmail()))
{
%>
<oneit:button value="Verify and proceed" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applyJobPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.toMap() %>"/>
<%
}
else
{
%>
<oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/>
<%
}
%>
</div>
</div>
</div>
...
...
cmsWebApp/webroot/extensions/performa/GeneralConfig_performa.xml
View file @
8d516bbc
...
...
@@ -32,15 +32,17 @@
<MAP
value=
"HOME_TL"
description=
"HomePage"
JSP=
"/extensions/performa/editor/additionalHomePage.jsp"
/>
</NODE>
<!--
<NODE name="WEB_BATCH::Email">
<NODE
name=
"WEB_BATCH::Email"
>
<TASK
factory=
"Participant"
class=
"oneit.appservices.batch.DefaultTask"
>
<RUN class="performa.utils.PerformaEmailFetcher" factory="Participant" />
<RUN
class=
"performa.utils.PerformaEmailFetcher"
factory=
"Participant"
>
<AccountVerificationEmailer
factory=
"Participant"
class=
"oneit.email.ConfigurableArticleTemplateEmailer"
templateShortcut=
"AccountVerificationMail"
/>
</RUN>
<WHEN
factory=
"MetaComponent"
component=
"BatchSchedule"
selector=
"performa.runbatch"
>
<NODE
name=
"schedule"
class=
"oneit.appservices.batch.QuickSchedule"
>
<NODE
name=
"period"
factory=
"Integer"
value=
"5"
/>
</NODE>
</WHEN>
</TASK>
</NODE>
-->
</NODE>
</OBJECTS>
\ No newline at end of file
cmsWebApp/webroot/extensions/performa/inc/stdimports.jsp
View file @
8d516bbc
<%@ page import="performa.orm.*, performa.orm.types.*, performa.form.*, performa.utils.*, performa.search.*"%>
<%@ page import="com.stripe.model.*"%>
<%@ page import="oneit.objstore.rdbms.filters.*, oneit.security.jsp.SecUserToNameTransform, oneit.servlets.utils.*, oneit.utils.image.*, oneit.objstore.utils.ObjstoreUtils "%>
<%@ page import="oneit.utils.text.FormatUtils, oneit.utils.math.*"%>
<%@ page import="oneit.objstore.rdbms.filters.*, oneit.se
rvlets.security.SessionSecUserDecorator, oneit.se
curity.jsp.SecUserToNameTransform, oneit.servlets.utils.*, oneit.utils.image.*, oneit.objstore.utils.ObjstoreUtils "%>
<%@ page import="oneit.utils.text.FormatUtils, oneit.utils.math.*
, oneit.net.LoopbackHTTP
"%>
<%@ page import="oneit.servlets.objstore.binary.*,oneit.servlets.jsp.ormtable.*"%>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment