Project

General

Profile

Bug #14795

User without edit_params permission can not save host with puppet class parameters

Added by Tomer Brisker almost 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Attempting to save leads to:

 | NoMethodError (undefined method `puppet?' for nil:NilClass):
 |   app/models/lookup_value.rb:32:in `value_present?'
 |   app/models/concerns/orchestration.rb:69:in `valid?'
 |   app/models/concerns/foreman/sti.rb:29:in `save_with_type'
 |   app/controllers/hosts_controller.rb:109:in `block in update'
 |   app/models/taxonomy.rb:76:in `block in no_taxonomy_scope'
 |   app/models/taxonomy.rb:83:in `block (2 levels) in as_taxonomy'
 |   app/models/concerns/foreman/thread_session.rb:147:in `as_location'
 |   app/models/taxonomy.rb:82:in `block in as_taxonomy'
 |   app/models/concerns/foreman/thread_session.rb:112:in `as_org'
 |   app/models/taxonomy.rb:81:in `as_taxonomy'
 |   app/models/taxonomy.rb:75:in `no_taxonomy_scope'
 |   app/controllers/hosts_controller.rb:106:in `update'
 |   app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'
 |

This is caused by the puppet default checkbox not being disabled for users without the edit_params permission.

Associated revisions

Revision c9405b9b (diff)
Added by Tomer Brisker almost 4 years ago

Fixes #14795 - User w/o edit_params permission can save host

Some puppet class parameter fields were not disabled for users without
the `edit_params` permission, leading to errors when attempting to save
a host with overriden parameters.

Revision 00d95713 (diff)
Added by Tomer Brisker almost 4 years ago

Fixes #14795 - User w/o edit_params permission can save host

Some puppet class parameter fields were not disabled for users without
the `edit_params` permission, leading to errors when attempting to save
a host with overriden parameters.

(cherry picked from commit c9405b9b573fafcd0a63c81538c4322180e8c9ce)

History

#1 Updated by Tomer Brisker almost 4 years ago

  • Description updated (diff)

#2 Updated by The Foreman Bot almost 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3460 added

#3 Updated by Anonymous almost 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 155

Also available in: Atom PDF