Commit 18142654 by Nilu

Social media login issue fix

parent 3418e342
......@@ -23,6 +23,7 @@ import oneit.servlets.utils.BaseHttpServletResponse;
import oneit.servlets.utils.decorator.ServletDecorator;
import oneit.servlets.utils.decorator.ServletDecoratorConfig;
import oneit.utils.*;
import oneit.utils.parsers.FieldException;
import performa.orm.Candidate;
import performa.orm.CompanyUser;
import performa.orm.Company;
......@@ -78,7 +79,7 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial
{
SecUser secUser = loginHandler.getOrCreateSecuser(request, transaction);
if(fullURL.contains(WebUtils.APPLICANT_PORTAL))
if(fullURL.contains(WebUtils.APPLICANT_PORTAL) && !secUser.hasPrivilege(Utils.PRIV_ACCESS_ADMIN_PORTAL))
{
secUser.addRole(Role.searchNAME(secUser.getTransaction(), Utils.ROLE_APPLICANT));
......@@ -86,7 +87,7 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial
candidate.setUser(secUser);
}
else if(fullURL.contains(WebUtils.ADMIN_PORTAL))
else if(fullURL.contains(WebUtils.ADMIN_PORTAL) && !secUser.hasPrivilege(Utils.PRIV_ACCESS_APPLICANT_PORTAL))
{
secUser.addRole(Role.searchNAME(secUser.getTransaction(), Utils.ROLE_CLIENT));
secUser.addRole(Role.searchNAME(secUser.getTransaction(), Utils.ROLE_COMPANY_ADMIN));
......
......@@ -95,8 +95,7 @@
}
});
if (!$('input[name$=Password]').val() || $('input[name$=Password]').val() !== $('input[name$=Password2]').val())
{
if (<%= !socialLogin %> && (!$('input[name$=Password]').val() || $('input[name$=Password]').val() !== $('input[name$=Password2]').val())) {
empty = true;
}
......
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