Skip to content

dev-maven to master-maven #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
367bf18
Fix 202211 (#209)
eisbilir Dec 10, 2022
05e9e6d
Update config.yml
Gunasekar-K Dec 9, 2022
5c8f96c
fix: part 1 initial layout
dedywahyudi Oct 10, 2022
eb66571
fix: vanilla forum link
dedywahyudi Oct 10, 2022
494fef6
ci: set dev to reskin-or
dedywahyudi Oct 10, 2022
a584d28
ci: set to 1 branch for dev
dedywahyudi Oct 10, 2022
c95460c
fix: set css folder to reskin-or
dedywahyudi Oct 10, 2022
550aa85
fix: change vanilla forum link
dedywahyudi Oct 11, 2022
93b1d58
fix: change to vanilla dev
dedywahyudi Oct 12, 2022
377afd7
fix: add vanilla links detection
dedywahyudi Oct 19, 2022
7e832a8
fix: 48 - part 2
dedywahyudi Oct 20, 2022
ae258cf
Merge pull request #200 from topcoder-platform/PROD-3006
dedywahyudi Oct 20, 2022
b6dd81d
fix: save buttons on the edit projects
dedywahyudi Oct 25, 2022
76b6ffc
fix: 48 - all & open project
dedywahyudi Oct 28, 2022
c3b1445
Merge branch 'dev-maven' into reskin-or
dedywahyudi Oct 29, 2022
93bbc1b
fix: 48 - late, contact & consistency
dedywahyudi Nov 3, 2022
aa64c97
fix: 48 - details page
dedywahyudi Nov 8, 2022
6b82f8a
fix: task 1
dedywahyudi Nov 15, 2022
49687fd
update download restrictions (#203)
eisbilir Nov 15, 2022
f847aad
fix: task 2
dedywahyudi Nov 16, 2022
8cfb949
update http max parameters (#204)
eisbilir Nov 16, 2022
7f1d334
fix: fix hardcoded server name
dedywahyudi Nov 17, 2022
0d9af58
fix: f2f updates s
dedywahyudi Nov 24, 2022
7e10e31
fix: challenge name in download
dedywahyudi Nov 24, 2022
1cff6dc
fix: edit project links
dedywahyudi Nov 28, 2022
395fd07
fix: payment page
dedywahyudi Nov 30, 2022
24b33d1
fix: edit payment
dedywahyudi Nov 30, 2022
fb11ab2
fix: buttons on the bottom
dedywahyudi Dec 1, 2022
cbbbb39
fix: contact manager edits
dedywahyudi Dec 1, 2022
a3d4901
fix: manage project
dedywahyudi Dec 3, 2022
df4de25
fix: final fixes in approval
dedywahyudi Dec 4, 2022
705ca1f
fix: late deliverables edit
dedywahyudi Dec 5, 2022
402b273
fix: edit project 1
dedywahyudi Dec 5, 2022
d3c025d
fix: edit project 2
dedywahyudi Dec 7, 2022
38d7c76
Update config.yml
Gunasekar-K Dec 9, 2022
eeafef6
Update config.yml
Gunasekar-K Dec 9, 2022
6c42a03
Merge pull request #208 from topcoder-platform/ci-fix-test
Gunasekar-K Dec 9, 2022
7594b37
fix: floating header, footer & buttons
dedywahyudi Dec 15, 2022
7fc5707
fix: more than 1 submission
dedywahyudi Dec 16, 2022
11a0bca
fix: remove pid
dedywahyudi Dec 19, 2022
db6466f
Merge pull request #221 from topcoder-platform/reskin-or-only
dedywahyudi Dec 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install_dependency: &install_dependency
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.4.8 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
Expand Down Expand Up @@ -190,7 +190,8 @@ workflows:
filters:
branches:
only:
- dev-maven
- reskin-or
- ci-fix-test

- deployProd:
context : org-global
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ RUN rm /root/tcs_informix-ds.xml
## add admin account
RUN /root/wildfly-26.0.1.Final/bin/add-user.sh -u 'admin' -p 'password1!'
RUN sed -i 's/<cached-connection-manager\/>/<cached-connection-manager debug="true" error="false"\/>/' /root/wildfly-26.0.1.Final/standalone/configuration/standalone.xml
RUN sed -i 's/<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"\/>/<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-parameters="5000"\/>/' /root/wildfly-26.0.1.Final/standalone/configuration/standalone.xml

CMD ["/root/wildfly-26.0.1.Final/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0","-DFOREGROUND"]
1 change: 1 addition & 0 deletions ECSDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ RUN rm /root/tcs_informix-ds.xml
## add admin account
RUN /root/wildfly-26.0.1.Final/bin/add-user.sh -u 'admin' -p 'password1!'
RUN sed -i 's/<cached-connection-manager\/>/<cached-connection-manager debug="true" error="false"\/>/' /root/wildfly-26.0.1.Final/standalone/configuration/standalone.xml
RUN sed -i 's/<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"\/>/<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true" max-parameters="5000"\/>/' /root/wildfly-26.0.1.Final/standalone/configuration/standalone.xml

CMD ["/root/wildfly-26.0.1.Final/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0","-DFOREGROUND"]
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ protected String handleDownloadSubmission(HttpServletRequest request, HttpServle
}

// Allow only submitter to download the submission if it is MM type of challenge
if (project.getProjectCategory().getId() == 37) {
if (project.getProjectCategory().getId() == 37 || project.getProjectCategory().getProjectType().getId() == 3) {
if (!Boolean.parseBoolean((String) project.getProperty("Viewable Submissions Flag"))) {
long submitter = upload.getOwner();
long loggedInUserId = AuthorizationHelper.getLoggedInUserId(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

import com.cronos.onlinereview.Constants;
import com.cronos.onlinereview.actions.DynamicModelDrivenAction;
import com.cronos.onlinereview.util.AuthorizationHelper;
import com.cronos.onlinereview.model.DynamicModel;
import com.cronos.onlinereview.util.ActionsHelper;
import com.cronos.onlinereview.util.Comparators;
import com.cronos.onlinereview.util.ConfigHelper;
import com.cronos.onlinereview.util.CorrectnessCheckResult;
import com.cronos.onlinereview.util.LoggingHelper;
import com.topcoder.onlinereview.component.exception.BaseException;
Expand Down Expand Up @@ -69,6 +71,25 @@ public String execute() throws BaseException {
}

Project project = verification.getProject();
request.setAttribute("projectStatus", project.getProjectStatus().getName());

final String projectTypeName = project.getProjectCategory().getProjectType().getName();

boolean hasForumType = project.getAllProperties().containsKey("Forum Type");

long projectId = project.getId();
long forumId = -1;
String tempStr;

tempStr = (String) project.getProperty("Developer Forum ID");
if (tempStr != null && tempStr.trim().length() != 0) {
forumId = Long.parseLong(tempStr, 10);
}

request.setAttribute("viewContestLink", ConfigHelper.getProjectTypeViewContestLink(projectTypeName, projectId));

request.setAttribute("forumLink", ConfigHelper.getProjectTypeForumLink(
(projectTypeName.equalsIgnoreCase("studio") && hasForumType) ? "NewStudio" : projectTypeName, forumId));

// obtains the project link manager
ProjectLinkManager linkManager = ActionsHelper.createProjectLinkManager();
Expand All @@ -92,6 +113,8 @@ public String execute() throws BaseException {

// set up projects except for deleted ones
request.setAttribute("allProjects", allProjects);
request.setAttribute("isAllowedToContactPM",
AuthorizationHelper.hasUserPermission(request, Constants.CONTACT_PM_PERM_NAME));

// Populate the form with project and project link properties
populateProjectLinkForm(getModel(), verification.getProject());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.cronos.onlinereview.util.AuthorizationHelper;
import com.cronos.onlinereview.util.CorrectnessCheckResult;
import com.cronos.onlinereview.util.LoggingHelper;
import com.cronos.onlinereview.util.ConfigHelper;
import com.topcoder.onlinereview.component.project.management.Project;
import com.topcoder.onlinereview.component.exception.BaseException;

Expand Down Expand Up @@ -64,6 +65,28 @@ public String execute() throws BaseException {
Project project = verification.getProject();
initProjectManagementConsole(request, project);

request.setAttribute("projectStatus", project.getProjectStatus().getName());

final String projectTypeName = project.getProjectCategory().getProjectType().getName();

boolean hasForumType = project.getAllProperties().containsKey("Forum Type");

long projectId = project.getId();
long forumId = -1;
String tempStr;

tempStr = (String) project.getProperty("Developer Forum ID");
if (tempStr != null && tempStr.trim().length() != 0) {
forumId = Long.parseLong(tempStr, 10);
}

request.setAttribute("viewContestLink", ConfigHelper.getProjectTypeViewContestLink(projectTypeName, projectId));

request.setAttribute("forumLink", ConfigHelper.getProjectTypeForumLink(
(projectTypeName.equalsIgnoreCase("studio") && hasForumType) ? "NewStudio" : projectTypeName, forumId));
request.setAttribute("isAllowedToContactPM",
AuthorizationHelper.hasUserPermission(request, Constants.CONTACT_PM_PERM_NAME));

return Constants.SUCCESS_FORWARD_NAME;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
import com.cronos.onlinereview.Constants;
import com.cronos.onlinereview.util.ActionsHelper;
import com.cronos.onlinereview.util.AuthorizationHelper;
import com.cronos.onlinereview.util.ConfigHelper;
import com.cronos.onlinereview.util.CorrectnessCheckResult;
import com.cronos.onlinereview.util.LoggingHelper;
import com.topcoder.onlinereview.component.project.management.Project;
import com.topcoder.onlinereview.component.project.payment.ProjectPayment;
import com.topcoder.onlinereview.component.project.payment.ProjectPaymentManager;
import com.topcoder.onlinereview.component.project.payment.ProjectPaymentFilterBuilder;
Expand Down Expand Up @@ -64,7 +66,30 @@ public String execute() throws BaseException {
// At this point, redirect-after-login attribute should be removed (if it exists)
AuthorizationHelper.removeLoginRedirect(request);

long projectId = verification.getProject().getId();
Project project = verification.getProject();

request.setAttribute("projectStatus", project.getProjectStatus().getName());

final String projectTypeName = project.getProjectCategory().getProjectType().getName();

boolean hasForumType = project.getAllProperties().containsKey("Forum Type");

long projectId = project.getId();
long forumId = -1;
String tempStr;

tempStr = (String) project.getProperty("Developer Forum ID");
if (tempStr != null && tempStr.trim().length() != 0) {
forumId = Long.parseLong(tempStr, 10);
}

request.setAttribute("viewContestLink", ConfigHelper.getProjectTypeViewContestLink(projectTypeName, projectId));

request.setAttribute("forumLink", ConfigHelper.getProjectTypeForumLink(
(projectTypeName.equalsIgnoreCase("studio") && hasForumType) ? "NewStudio" : projectTypeName, forumId));
request.setAttribute("isAllowedToContactPM",
AuthorizationHelper.hasUserPermission(request, Constants.CONTACT_PM_PERM_NAME));

ProjectPaymentManager projectPaymentManager = ActionsHelper.createProjectPaymentManager();
List<ProjectPayment> payments = projectPaymentManager.search(
ProjectPaymentFilterBuilder.createProjectIdFilter(projectId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.cronos.onlinereview.util.ConfigHelper;
import com.cronos.onlinereview.util.CorrectnessCheckResult;
import com.cronos.onlinereview.util.LoggingHelper;
import com.topcoder.onlinereview.component.project.management.Project;
import com.topcoder.onlinereview.component.project.payment.ProjectPayment;
import com.topcoder.onlinereview.component.project.payment.ProjectPaymentManager;
import com.topcoder.onlinereview.component.project.payment.ProjectPaymentFilterBuilder;
Expand Down Expand Up @@ -65,7 +66,27 @@ public String execute() throws BaseException {
// At this point, redirect-after-login attribute should be removed (if it exists)
AuthorizationHelper.removeLoginRedirect(request);

long projectId = verification.getProject().getId();
Project project = verification.getProject();

request.setAttribute("projectStatus", project.getProjectStatus().getName());

final String projectTypeName = project.getProjectCategory().getProjectType().getName();

boolean hasForumType = project.getAllProperties().containsKey("Forum Type");

long projectId = project.getId();
long forumId = -1;
String tempStr;

tempStr = (String) project.getProperty("Developer Forum ID");
if (tempStr != null && tempStr.trim().length() != 0) {
forumId = Long.parseLong(tempStr, 10);
}

request.setAttribute("viewContestLink", ConfigHelper.getProjectTypeViewContestLink(projectTypeName, projectId));

request.setAttribute("forumLink", ConfigHelper.getProjectTypeForumLink(
(projectTypeName.equalsIgnoreCase("studio") && hasForumType) ? "NewStudio" : projectTypeName, forumId));
ProjectPaymentManager projectPaymentManager = ActionsHelper.createProjectPaymentManager();
List<ProjectPayment> payments = projectPaymentManager.search(
ProjectPaymentFilterBuilder.createProjectIdFilter(projectId));
Expand All @@ -74,6 +95,8 @@ public String execute() throws BaseException {
Resource[] resources = ActionsHelper.getAllResourcesForProject(verification.getProject());
populateResourcesMap(request, resources);
request.setAttribute("payments", payments);
request.setAttribute("isAllowedToContactPM",
AuthorizationHelper.hasUserPermission(request, Constants.CONTACT_PM_PERM_NAME));
request.setAttribute("isAllowedToEditPayments",
AuthorizationHelper.hasUserPermission(request, Constants.EDIT_PAYMENTS_PERM_NAME));
request.setAttribute("pactsPaymentDetailBaseURL", ConfigHelper.getPactsPaymentDetailBaseURL());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ public int doEndTag() throws JspException {
textColor = "coderTextOrange";
}


// Start preparing resulting output
StringBuilder results = new StringBuilder("<a href=\"http://www.topcoder.com/tc?module=MemberProfile&cr=");
StringBuilder results = new StringBuilder("<a href=\"http://<%=ApplicationServer.SERVER_NAME%>/tc?module=MemberProfile&cr=");
// appending coder's id to the generated link
results.append(coderId);
// tab will be specified only if tab local variable is not empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ public static void gatherUserRoles(HttpServletRequest request) throws BaseExcept
ExternalUser extUser = usrMgr.retrieveUser(getLoggedInUserId(request));
// Place handle of the user into session as attribute
request.getSession().setAttribute("userHandle", extUser.getHandle());
request.getSession().setAttribute("userFirstName", extUser.getFirstName());
request.getSession().setAttribute("userLastName", extUser.getLastName());
request.getSession().setAttribute("userEmail", extUser.getEmail());
}

// Perform search for resources
Expand Down Expand Up @@ -478,7 +481,7 @@ private static AuthorizationService retrieveAuthorizationService(HttpServletRequ
* Sets the sso cookie service to be used for authenticating users based on
* cookie.
* </p>
*
*
* @param ssoCookieService the ssoCookieService to set
*/
public void setSsoCookieService(SSOCookieService ssoCookieService) {
Expand All @@ -489,7 +492,7 @@ public void setSsoCookieService(SSOCookieService ssoCookieService) {
* <p>
* Validate jwt token
* </p>
*
*
* @param token the jwt token
* @throws JWTException if any error occurs
* @return the DecodedJWT result
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/cronos/onlinereview/util/ConfigHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,11 @@ public class ConfigHelper {
*/
private static final String CHALLENGE_BY_LEGACY_ID_URL_V5 = "challenge_by_legacy_id_url_v5";

/**
* <p>A <code>String</code> providing support requests v5 url property.</p>
*/
private static final String SUPPORT_REQUEST_URL_V5 = "support_request_url_v5";

/**
* This member variable holds the submitter role id.
*/
Expand Down Expand Up @@ -1069,6 +1074,11 @@ public class ConfigHelper {
*/
private static String challengeByLegacyIdUrlV5;

/**
* Support Request URL
*/
private static String supportRequestUrlV5;

static {
// Obtaining the instance of Configuration Manager
ConfigManager cfgMgr = new ConfigManager();
Expand Down Expand Up @@ -1696,6 +1706,8 @@ public class ConfigHelper {
newAuthUrl = newAuth.getValue("new_auth_url");

challengeByLegacyIdUrlV5 = cfgMgr.getString(ONLINE_REVIEW_CFG_NS, CHALLENGE_BY_LEGACY_ID_URL_V5);

supportRequestUrlV5 = cfgMgr.getString(ONLINE_REVIEW_CFG_NS, SUPPORT_REQUEST_URL_V5);
} catch (Exception une) {
System.out.println(une.getMessage());
une.printStackTrace();
Expand Down Expand Up @@ -2586,4 +2598,12 @@ public static String getNewAuthUrl() {
public static String getChallengeByLegacyIdUrlV5() {
return challengeByLegacyIdUrlV5;
}

/**
* Get support request url
* @return url
*/
public static String getSupportRequestUrlV5() {
return supportRequestUrlV5;
}
}
Loading