Sha256: 87893793888b26ded8463b87b52707c060f6987b9359eee6c5a91e44fe969d7b

Contents?: true

Size: 416 Bytes

Versions: 19

Compression:

Stored size: 416 Bytes

Contents

view_permission = Permission.where(:name => :view_foreman_tasks, :resource_type => ForemanTasks::Task.name).first

# the view_permissions can be nil in tests: skipping in that case
if view_permission && !Role.anonymous.permissions.include?(view_permission)
  Role.anonymous.filters.create(:search => 'owner.id = current_user') do |filter|
    filter.filterings.build { |f| f.permission = view_permission }
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
foreman-tasks-0.7.14 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.13 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.12 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.11 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.10 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.9 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.8 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.7 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.6 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.5 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.4 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.3 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.2 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.1 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.7.0 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.6.15 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.6.14 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.6.13 db/seeds.d/20-foreman_tasks_permissions.rb
foreman-tasks-0.6.12 db/seeds.d/20-foreman_tasks_permissions.rb