Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public String execute() throws Exception {
}

if (!securityInfoManager.hasPrivilege(loggedInInfo, "_demographic", "r", null)) {
throw new SecurityException("missing required security object (_demographic)");
throw new SecurityException("missing required sec object (_demographic)");
}

restoreFromSession();
Expand Down Expand Up @@ -757,7 +757,7 @@ public String updateNoteLock() {
return null;
}
if (!securityInfoManager.hasPrivilege(loggedInInfo, "_demographic", "w", null)) {
throw new SecurityException("missing required security object (_demographic)");
throw new SecurityException("missing required sec object (_demographic)");
}

String demoNo = getDemographicNo(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ private void validateWritePrivilege() {
throw new SecurityException("User session is not valid");
}
if (!securityInfoManager.hasPrivilege(loggedInInfo, "_demographic", "w", null)) {
throw new SecurityException("missing required security object (_demographic)");
throw new SecurityException("missing required sec object (_demographic)");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class ConsultationLookup2Action extends ActionSupport {
public String execute() {
// Security check - user must have consultation read access
if (!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_con", "r", null)) {
throw new SecurityException("missing required security object");
throw new SecurityException("missing required sec object (_con)");
}

String method = request.getParameter("method");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class CpsoSearch2Action extends ActionSupport {
public String execute() {
LoggedInInfo loggedInInfo = LoggedInInfo.getLoggedInInfoFromSession(request);
if (loggedInInfo == null || !securityInfoManager.hasPrivilege(loggedInInfo, "_admin,_admin.consult", "w", null)) {
throw new SecurityException("missing required security object _admin.consult");
throw new SecurityException("missing required sec object (_admin.consult)");
}

String lastName = request.getParameter("lastName");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public ConsultationClinicalData2Action() {

public String execute() {
if (!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_con", "r", null)) {
throw new SecurityException("missing required security object _con");
throw new SecurityException("missing required sec object (_con)");
}
String method = request.getParameter("method");
if ("fetchLongTermMedications".equals(method)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public String execute()
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}
private String[] selectedAddTypes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public String execute() throws ServletException, IOException {
return outcome;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String execute()
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

A semicolon is missing at the end of the statement, which will cause a compilation error.

Suggested change
throw new SecurityException("missing required sec object (_admin)")
throw new SecurityException("missing required sec object (_admin)");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Add the missing semicolon.

This throw statement will not compile as written.

Fix
-            throw new SecurityException("missing required sec object (_admin)")
+            throw new SecurityException("missing required sec object (_admin)");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
throw new SecurityException("missing required sec object (_admin)")
throw new SecurityException("missing required sec object (_admin)");
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/io/github/carlos_emr/carlos/encounter/oscarMeasurements/pageUtil/EctAddMeasurementType2Action.java`
at line 104, The throw statement in EctAddMeasurementType2Action has a syntax
error because the SecurityException line is missing its terminating semicolon.
Update the exception throw in the affected handler so the statement is valid
Java and the class compiles cleanly.

}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public String execute()
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
}
throw new SecurityException("missing required sec object (_admin)");
}
Comment on lines 96 to 98

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The closing brace } for the else block was accidentally removed, which will cause a syntax/compilation error.

Suggested change
} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
}
throw new SecurityException("missing required sec object (_admin)");
}
} else {
throw new SecurityException("missing required sec object (_admin)");
}
}


/*****************************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public String execute() throws ServletException, IOException {
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public String execute()
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}
private String[] deleteCheckbox;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public String execute()
return SUCCESS;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public String execute() throws ServletException, IOException {
return outcome;

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public String execute() throws ServletException, IOException {
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String execute() {

if (!securityInfoManager.hasPrivilege(loggedInInfo, "_admin", "r", null)
&& !securityInfoManager.hasPrivilege(loggedInInfo, "_admin.measurements", "r", null)) {
throw new SecurityException("missing required security object (_admin or _admin.measurements)");
throw new SecurityException("missing required sec object (_admin or _admin.measurements)");
}

return "continue";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String execute() throws ServletException, IOException {
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin)
throw new SecurityException("missing required sec object (_admin)");

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public String execute()
return "continue";

} else {
throw new SecurityException("Access Denied!"); //missing required sec object (_admin) or (_admin.measurements)
}
throw new SecurityException("missing required sec object (_admin)");
}
Comment on lines 68 to 70

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The closing brace } for the else block was accidentally removed, which will cause a syntax/compilation error.

        } else {
            throw new SecurityException("missing required sec object (_admin)");
        }
    }

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public final class EctInsertTemplate2Action extends ActionSupport {

public String execute() throws Exception {
if (!securityInfoManager.hasPrivilege(LoggedInInfo.getLoggedInInfoFromSession(request), "_newCasemgmt.templates", "r", null)) {
throw new SecurityException("missing required security object: _newCasemgmt.templates");
throw new SecurityException("missing required sec object (_newCasemgmt.templates)");
}

String templateName = request.getParameter("templateName");
Expand Down