app/models/foreman_tasks/task.rb in foreman-tasks-0.9.3 vs app/models/foreman_tasks/task.rb in foreman-tasks-0.9.4

- old
+ new

@@ -2,9 +2,19 @@ module ForemanTasks class Task < ActiveRecord::Base include Authorizable + def check_permissions_after_save + # there's no create_tasks permission, tasks are created as a result of internal actions, in such case we + # don't do authorization, that should have been performed on wrapping action level + if id_changed? + true + else + super + end + end + # TODO: missing validation of states self.primary_key = :id before_create :generate_id