Skip to content

Commit c91d238

Browse files
committed
Fixed: Add permission check for runAsSystemUser in CoreEvents
(cherry picked from commit c8d9f48)
1 parent b01e1f4 commit c91d238

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • framework/webapp/src/main/java/org/apache/ofbiz/webapp/event

framework/webapp/src/main/java/org/apache/ofbiz/webapp/event/CoreEvents.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ public static String scheduleService(HttpServletRequest request, HttpServletResp
125125
String serviceCnt = (String) params.remove("SERVICE_COUNT");
126126
String retryCnt = (String) params.remove("SERVICE_MAXRETRY");
127127
String runAsSystemUser = (String) params.remove("SERVICE_RUN_AS_SYSTEM");
128+
if (!security.hasPermission("SERVICE_RSAS_VIEW", userLogin)) {
129+
runAsSystemUser = "N";
130+
}
128131

129132
// the frequency map
130133
Map<String, Integer> freqMap = new HashMap<>();

0 commit comments

Comments
 (0)