Skip to content

Commit

Permalink
TRUNK-6259 do not add null proxy privileges
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa committed Oct 2, 2024
1 parent 5df3754 commit 45cfd84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/src/main/java/org/openmrs/api/context/UserContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ public void logout() {
* @param privilege to give to users
*/
public void addProxyPrivilege(String privilege) {

if (privilege == null) {
throw new IllegalArgumentException("UserContext.addProxyPrivilege does not accept null privileges");
}

log.debug("Adding proxy privilege: {}", privilege);

proxies.add(privilege);
Expand Down

0 comments on commit 45cfd84

Please sign in to comment.