Skip to content
Snippets Groups Projects
Commit 330be7bf authored by xuechen5's avatar xuechen5 Committed by adityab3
Browse files

Backend: allow pregistered patient role to access home page

parent 22057af9
No related branches found
No related tags found
1 merge request!3Uc91.1
......@@ -17,10 +17,17 @@ if(request.getUserPrincipal() != null) {
long mid = Long.valueOf(request.getUserPrincipal().getName());
if (request.isUserInRole("patient")) {
response.sendRedirect("patient/home.jsp");
return;
}
else if (request.isUserInRole("preRegisteredPatient")) {
response.sendRedirect("preRegisteredPatient/home.jsp");
return;
}
else if (request.isUserInRole("uap")) {
response.sendRedirect("uap/home.jsp");
return;
......@@ -53,14 +60,13 @@ if(request.getUserPrincipal() != null) {
session.invalidate();
response.sendRedirect("/iTrust/");
}
else if (mid == 0)
{
else if (mid == 0) {
session.invalidate();
}
else {
else {
response.sendRedirect("errors/noaccess.jsp");
}
}
%>
......@@ -34,6 +34,10 @@ try {
userRole = (String) session.getAttribute("userRole");
if (userRole == null) {
if (request.isUserInRole("preRegisteredPatient")) {
userRole = "preRegisteredPatient";
}
if (request.isUserInRole("patient")) {
userRole = "patient";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment