Unverified Commit 386b1278 authored by Reshmi V Nair's avatar Reshmi V Nair Committed by GitHub
Browse files

SB-27815 Terms & policies page throwing up technical error (#997)

Showing with 4 additions and 2 deletions
+4 -2
......@@ -555,6 +555,7 @@ public final class JsonKey {
public static final String ORG_ADMIN = "ORG_ADMIN";
public static final String ORG_ADMIN_TNC = "orgAdminTnc";
public static final String REPORT_VIEWER = "REPORT_VIEWER";
public static final String REPORT_ADMIN = "REPORT_ADMIN";
public static final String REPORT_VIEWER_TNC = "reportViewerTnc";
public static final String REQUEST_ID = "requestid";
public static final String LOCATION_TYPE_SCHOOL = "school";
......
......@@ -122,8 +122,9 @@ public class UserTncService {
// check if it is org admin TnC and user is not an admin of the organisation
// OR check if it is report viewer tnc and user not having the report viewer role
if ((JsonKey.ORG_ADMIN_TNC.equals(tncType) && !roleCheck(user, JsonKey.ORG_ADMIN, context))
|| (JsonKey.REPORT_VIEWER_TNC.equals(tncType)
&& !roleCheck(user, JsonKey.REPORT_VIEWER, context))) {
|| (JsonKey.REPORT_VIEWER_TNC.equals(tncType)
&& (!roleCheck(user, JsonKey.REPORT_VIEWER, context)
|| !roleCheck(user, JsonKey.REPORT_ADMIN, context)))) {
ProjectCommonException.throwClientErrorException(
ResponseCode.invalidParameterValue,
MessageFormat.format(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment