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

Added security-role for PreRegistered Patient

parent 6e253291
No related branches found
No related tags found
1 merge request!3Uc91.1
...@@ -84,7 +84,11 @@ ...@@ -84,7 +84,11 @@
</security-role> </security-role>
<security-role> <security-role>
<role-name>tester</role-name> <role-name>tester</role-name>
</security-role> </security-role>
<security-role>
<role-name>preRegisteredPatient</role-name>
</security-role>
<!-- Define all role-based authorization folders <!-- Define all role-based authorization folders
...@@ -95,6 +99,7 @@ ...@@ -95,6 +99,7 @@
/auth/admin/* - JSPs for Administrators only /auth/admin/* - JSPs for Administrators only
/auth/staff/* - JSPs for only hospital staff (hcps, uaps, admin, lt) /auth/staff/* - JSPs for only hospital staff (hcps, uaps, admin, lt)
/auth/patient/* - JSPs for patients only /auth/patient/* - JSPs for patients only
/auth/preRegisteredPatient/* - JSPs for preRegisteredPatients only
/auth/lt/* - JSPs for LTs only /auth/lt/* - JSPs for LTs only
If any user attempts to access a folder that their role is not authorized for, If any user attempts to access a folder that their role is not authorized for,
...@@ -126,6 +131,9 @@ ...@@ -126,6 +131,9 @@
<role-name>tester</role-name> <role-name>tester</role-name>
<role-name>pha</role-name> <role-name>pha</role-name>
<role-name>lt</role-name> <role-name>lt</role-name>
<role-name>preRegisteredPatient</role-name>
</auth-constraint> </auth-constraint>
</security-constraint> </security-constraint>
...@@ -278,6 +286,23 @@ ...@@ -278,6 +286,23 @@
</auth-constraint> </auth-constraint>
</security-constraint> </security-constraint>
<security-constraint>
<display-name>PreRegisteredPatient Only</display-name>
<web-resource-collection>
<web-resource-name>
Only PreRegisteredPatient are Allowed
</web-resource-name>
<!-- Define the context-relative URL(s) to be protected -->
<url-pattern>/auth/preRegisteredPatient/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- Anyone with one of the listed roles may access this area -->
<role-name>preRegisteredPatient</role-name>
</auth-constraint>
</security-constraint>
<security-constraint> <security-constraint>
<display-name>PHA Only</display-name> <display-name>PHA Only</display-name>
<web-resource-collection> <web-resource-collection>
......
package edu.ncsu.csc.itrust.enums; package edu.ncsu.csc.itrust.enums;
/** /**
* The iTrust user roles: Patient, ER, HCP, UAP, LT, PHA, Administrator and Tester. * The iTrust user roles: Pre-registered Patient, Patient, ER, HCP, UAP, LT, PHA, Administrator and Tester.
* Consult the requirements for the contextual meanings of these individual choices. * Consult the requirements for the contextual meanings of these individual choices.
*/ */
public enum Role { public enum Role {
/**PRE-REGISTERED PATIENT*/
PREREGISTEREDPATIENT("preRegisteredPatient", "Patients", 0L),
/**PATIENT*/ /**PATIENT*/
PATIENT("patient", "Patients", 0L), PATIENT("patient", "Patients", 0L),
/**ER*/ /**ER*/
......
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