Project

General

Profile

« Previous | Next » 

Revision c7f55be1

Added by Ori Rabin almost 8 years ago

Fixes #13164 - Add view_params permission

A new view_params permission was added for parameters inheriting from
Parameter object. The only exception is global parameters, which are
already handled by filter for CommonParameter resource.

This new permissions is also automatically added to viewer and site
manager roles, as well as any other roles with any of the existing
Parameters permissions.

With the patch it's now also possible to use granular filters for all
parameters that Foreman supports.

Contributions from:

View differences:

test/factories/subnet.rb
FactoryGirl.define do
factory :subnet_parameter, :parent => :parameter, :class => SubnetParameter do
type 'SubnetParameter'
end
factory :subnet do
sequence(:name) {|n| "subnet#{n}" }
ipam "None"
......
trait :ipam_dhcp do
ipam "DHCP"
end
trait :with_parameter do
after(:create) do |subnet,evaluator|
FactoryGirl.create(:subnet_parameter, :subnet => subnet)
end
end
end
factory :subnet_ipv6, :class => Subnet::Ipv6 do

Also available in: Unified diff