Sha256: 1212cf27a81707b0174e4798b684c289f0366aaf25133b11f44d6d583794c521
Contents?: true
Size: 583 Bytes
Versions: 141
Compression:
Stored size: 583 Bytes
Contents
view_permission = Permission.where(:name => :view_foreman_tasks, :resource_type => ForemanTasks::Task.name).first # the anonymous role was renamed to default in # https://github.com/theforeman/foreman/pull/3239 default_role = Role.respond_to?(:default) ? Role.default : Role.anonymous # 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 => 'owner.id = current_user') do |filter| filter.filterings.build { |f| f.permission = view_permission } end end
Version data entries
141 entries across 141 versions & 1 rubygems
Version | Path |
---|---|
foreman-tasks-0.7.15 | db/seeds.d/20-foreman_tasks_permissions.rb |