Skip to content

Commit 6b82f8a

Browse files
committed
fix: task 1
1 parent aa64c97 commit 6b82f8a

26 files changed

+2127
-20
lines changed

src/main/java/com/cronos/onlinereview/util/AuthorizationHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,9 @@ public static void gatherUserRoles(HttpServletRequest request) throws BaseExcept
219219
ExternalUser extUser = usrMgr.retrieveUser(getLoggedInUserId(request));
220220
// Place handle of the user into session as attribute
221221
request.getSession().setAttribute("userHandle", extUser.getHandle());
222+
request.getSession().setAttribute("userFirstName", extUser.getFirstName());
223+
request.getSession().setAttribute("userLastName", extUser.getLastName());
224+
request.getSession().setAttribute("userEmail", extUser.getEmail());
222225
}
223226

224227
// Perform search for resources
@@ -478,7 +481,7 @@ private static AuthorizationService retrieveAuthorizationService(HttpServletRequ
478481
* Sets the sso cookie service to be used for authenticating users based on
479482
* cookie.
480483
* </p>
481-
*
484+
*
482485
* @param ssoCookieService the ssoCookieService to set
483486
*/
484487
public void setSsoCookieService(SSOCookieService ssoCookieService) {
@@ -489,7 +492,7 @@ public void setSsoCookieService(SSOCookieService ssoCookieService) {
489492
* <p>
490493
* Validate jwt token
491494
* </p>
492-
*
495+
*
493496
* @param token the jwt token
494497
* @throws JWTException if any error occurs
495498
* @return the DecodedJWT result

src/main/java/com/cronos/onlinereview/util/ConfigHelper.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ public class ConfigHelper {
593593
*/
594594
private static final String CHALLENGE_BY_LEGACY_ID_URL_V5 = "challenge_by_legacy_id_url_v5";
595595

596+
/**
597+
* <p>A <code>String</code> providing support requests v5 url property.</p>
598+
*/
599+
private static final String SUPPORT_REQUEST_URL_V5 = "support_request_url_v5";
600+
596601
/**
597602
* This member variable holds the submitter role id.
598603
*/
@@ -1069,6 +1074,11 @@ public class ConfigHelper {
10691074
*/
10701075
private static String challengeByLegacyIdUrlV5;
10711076

1077+
/**
1078+
* Support Request URL
1079+
*/
1080+
private static String supportRequestUrlV5;
1081+
10721082
static {
10731083
// Obtaining the instance of Configuration Manager
10741084
ConfigManager cfgMgr = new ConfigManager();
@@ -1696,6 +1706,8 @@ public class ConfigHelper {
16961706
newAuthUrl = newAuth.getValue("new_auth_url");
16971707

16981708
challengeByLegacyIdUrlV5 = cfgMgr.getString(ONLINE_REVIEW_CFG_NS, CHALLENGE_BY_LEGACY_ID_URL_V5);
1709+
1710+
supportRequestUrlV5 = cfgMgr.getString(ONLINE_REVIEW_CFG_NS, SUPPORT_REQUEST_URL_V5);
16991711
} catch (Exception une) {
17001712
System.out.println(une.getMessage());
17011713
une.printStackTrace();
@@ -2586,4 +2598,12 @@ public static String getNewAuthUrl() {
25862598
public static String getChallengeByLegacyIdUrlV5() {
25872599
return challengeByLegacyIdUrlV5;
25882600
}
2601+
2602+
/**
2603+
* Get support request url
2604+
* @return url
2605+
*/
2606+
public static String getSupportRequestUrlV5() {
2607+
return supportRequestUrlV5;
2608+
}
25892609
}

src/main/resources/MessageResources.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,12 @@ editLateDeliverable.Explanation.label=Explanation:
11391139
editLateDeliverable.Response.label=Response:
11401140
editLateDeliverable.ValidationFailed=There were validation errors. See below.
11411141

1142+
# ----- supportModal.jsp page -----
1143+
supportForm.firstName=First Name
1144+
supportForm.lastName=Last Name
1145+
supportForm.email=Email
1146+
supportForm.textArea=How can we help you?
1147+
11421148
# ----- /jsp/editFinalReview.jsp page -----
11431149
viewScorecard.MinimumPassingScore=The minimum passing score:
11441150

src/main/resources/config.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2095,4 +2095,7 @@
20952095
<Property name="challenge_by_legacy_id_url_v5">
20962096
<Value>@topcoder_api_base_url_v5@/challenges?legacyId=</Value>
20972097
</Property>
2098-
</Config>
2098+
<Property name="support_request_url_v5">
2099+
<Value>@topcoder_api_base_url_v5@/challenges/support-requests</Value>
2100+
</Property>
2101+
</Config>

0 commit comments

Comments
 (0)