Class: WorkflowsController

Inherits:
WorkflowKit::WorkflowsController
  • Object
show all
Defined in:
app/controllers/workflows_controller.rb

Instance Method Summary collapse

Instance Method Details

#executeObject

This override of the original execute method checks for the authorization and then passes to the original method.

If this override wouldn’t be here, access would be denied on a global scale, except for global admins.



14
15
16
17
18
# File 'app/controllers/workflows_controller.rb', line 14

def execute
  authorize! :execute, Workflow.find(params[:id])
  authorize! :manage, User.find(params[:user_id]) if params[:user_id]
  super
end