1. pom.xml:
a. Added timestamp in properties.
b. In <build> added <resources> with filtering set to true.
2. GlobalVars.java: Added GlobalVars class for date of deploy & date of build.
3. AuthorizationConfiguration.java: In @EnableConfigurationProperties added GlobalVars.class.
4. AuthorizationLibraryCheckDeployController.java: Added exposing date of deploy and date of build.
5. authorization.properties: Added property authorization.globalVars.buildDate=@timestamp@
1. Added folder /controllers.
2. AuthorizationLibraryCheckDeployController.java: [NEW] Controller added and
a. "hello()" method (@RequestMapping(value = {"", "/health_check"}, method = RequestMethod.GET)) which just prints and returns a greeting message.
b. "checkEverything()" method @RequestMapping(value = "/health_check/advanced", method = RequestMethod.GET) only accessible by PORTAL ADMINS which checks connection with db and prints properties.
AuthorizationService.java: [Bug fix] Added "authentication.getPrincipal() instanceof User" check before casting authentication.getPrincipal() to User - if user is not logged in, it is String.
1. AuthorizationService.java: [Bug fix] In method "curator()", "CURATOR" is a prefix, not suffix in role.
2. AuthorizationConfiguration.java: Comment "@PropertySources" as this is a library project and properties are set by parent project.
1. Add private method "mapType()", to map "organization" to "institution" and "ri" to "community" for roles.
2. Add public method "getRoles()" to access roles (as Strings) from Granted Authorities.