diff --git a/app/registries/foreman/access_permissions.rb b/app/registries/foreman/access_permissions.rb index 5de60177836..8f998430b1e 100644 --- a/app/registries/foreman/access_permissions.rb +++ b/app/registries/foreman/access_permissions.rb @@ -639,4 +639,11 @@ map.permission :edit_settings, { :settings => [:update], :'api/v2/settings' => [:update] } end + + permission_set.security_block :lookup_values do |map| + map.permission :view_lookup_values, {:lookup_values => [:index]} + map.permission :create_lookup_values, {:lookup_values => [:create]} + map.permission :edit_lookup_values, {:lookup_values => [:update]} + map.permission :destroy_lookup_values, {:lookup_values => [:destroy]} + end end diff --git a/db/seeds.d/020-permissions_list.rb b/db/seeds.d/020-permissions_list.rb index 3dd40f45fce..ae4b6f74003 100644 --- a/db/seeds.d/020-permissions_list.rb +++ b/db/seeds.d/020-permissions_list.rb @@ -76,6 +76,10 @@ def permissions ['Location', 'edit_locations'], ['Location', 'destroy_locations'], ['Location', 'assign_locations'], + ['LookupValue', 'view_lookup_values'], + ['LookupValue', 'create_lookup_values'], + ['LookupValue', 'edit_lookup_values'], + ['LookupValue', 'destroy_lookup_values'], ['MailNotification', 'view_mail_notifications'], ['MailNotification', 'edit_user_mail_notifications'], ['Medium', 'view_media'],