2222import org .slf4j .LoggerFactory ;
2323import org .springframework .context .ApplicationEventPublisher ;
2424import org .springframework .context .event .EventListener ;
25- import org .springframework .security .access .prepost .PreAuthorize ;
2625import org .springframework .stereotype .Component ;
2726
2827import com .netflix .conductor .annotations .Trace ;
@@ -149,8 +148,6 @@ public void resetCallbacksForWorkflow(String workflowId) {
149148 });
150149 }
151150
152- @ PreAuthorize (
153- "hasPermission(#request, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
154151 public String rerun (RerunWorkflowRequest request ) {
155152 Utils .checkNotNull (request .getReRunFromWorkflowId (), "reRunFromWorkflowId is missing" );
156153 if (!rerunWF (
@@ -173,8 +170,6 @@ public String rerun(RerunWorkflowRequest request) {
173170 * @throws NotFoundException Workflow definition is not found or Workflow is deemed
174171 * non-restartable as per workflow definition.
175172 */
176- @ PreAuthorize (
177- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
178173 public void restart (String workflowId , boolean useLatestDefinitions ) {
179174 final WorkflowModel workflow = executionDAOFacade .getWorkflowModel (workflowId , true );
180175
@@ -260,8 +255,6 @@ public void restart(String workflowId, boolean useLatestDefinitions) {
260255 *
261256 * @param workflowId the id of the workflow to be retried
262257 */
263- @ PreAuthorize (
264- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
265258 public void retry (String workflowId , boolean resumeSubworkflowTasks ) {
266259 WorkflowModel workflow = executionDAOFacade .getWorkflowModel (workflowId , true );
267260 if (!workflow .getStatus ().isTerminal ()) {
@@ -564,8 +557,6 @@ WorkflowModel completeWorkflow(WorkflowModel workflow) {
564557 return workflow ;
565558 }
566559
567- @ PreAuthorize (
568- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
569560 public void terminateWorkflow (String workflowId , String reason ) {
570561 WorkflowModel workflow = executionDAOFacade .getWorkflowModel (workflowId , true );
571562 if (WorkflowModel .Status .COMPLETED .equals (workflow .getStatus ())) {
@@ -1188,8 +1179,6 @@ List<TaskModel> dedupAndAddTasks(WorkflowModel workflow, List<TaskModel> tasks)
11881179 /**
11891180 * @throws ConflictException if the workflow is in terminal state.
11901181 */
1191- @ PreAuthorize (
1192- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
11931182 public void pauseWorkflow (String workflowId ) {
11941183 try {
11951184 executionLockService .acquireLock (workflowId , 60000 );
@@ -1225,8 +1214,6 @@ public void pauseWorkflow(String workflowId) {
12251214 * @param workflowId the workflow to be resumed
12261215 * @throws IllegalStateException if the workflow is not in PAUSED state
12271216 */
1228- @ PreAuthorize (
1229- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
12301217 public void resumeWorkflow (String workflowId ) {
12311218 WorkflowModel workflow = executionDAOFacade .getWorkflowModel (workflowId , false );
12321219 if (!workflow .getStatus ().equals (WorkflowModel .Status .PAUSED )) {
@@ -1255,8 +1242,6 @@ public void resumeWorkflow(String workflowId) {
12551242 * @param skipTaskRequest the {@link SkipTaskRequest} object
12561243 * @throws IllegalStateException
12571244 */
1258- @ PreAuthorize (
1259- "hasPermission(#workflowId, T(com.netflix.conductor.common.metadata.acl.Permission).OPERATOR)" )
12601245 public void skipTaskFromWorkflow (
12611246 String workflowId , String taskReferenceName , SkipTaskRequest skipTaskRequest ) {
12621247
0 commit comments