Sha256: 6667f78e1b97fc0335f1c2fd3b2d4d17e1c304b854dbbfb34ba686fde9b870a4

Contents?: true

Size: 421 Bytes

Versions: 87

Compression:

Stored size: 421 Bytes

Contents

view_permission = Permission.find_by(name: "view_job_invocations", resource_type: 'JobInvocation')
default_role = Role.default

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

Version data entries

87 entries across 87 versions & 1 rubygems

Version Path
foreman_remote_execution-11.1.3 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.1.2 db/seeds.d/20-permissions.rb
foreman_remote_execution-12.0.0 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.1.1 db/seeds.d/20-permissions.rb
foreman_remote_execution-11.1.1 db/seeds.d/20-permissions.rb
foreman_remote_execution-11.1.0 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.1.0 db/seeds.d/20-permissions.rb
foreman_remote_execution-8.3.3 db/seeds.d/20-permissions.rb
foreman_remote_execution-8.3.2 db/seeds.d/20-permissions.rb
foreman_remote_execution-11.0.0 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.7 db/seeds.d/20-permissions.rb
foreman_remote_execution-8.3.1 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.6 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.5 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.4 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.3 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.2 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.1 db/seeds.d/20-permissions.rb
foreman_remote_execution-10.0.0 db/seeds.d/20-permissions.rb
foreman_remote_execution-8.3.0 db/seeds.d/20-permissions.rb