Project

General

Profile

Bug #3596

Foreman 1.3.0: Validation failed: User has this hostgroup already

Added by Peter Gustafsson over 5 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Authorization
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When creating a new hostgroup as a non admin user i receives below trace message, but the hostgroup is created.

ActiveRecord::RecordInvalid
Validation failed: User has this hostgroup already
app/controllers/hostgroups_controller.rb:64:in `create'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'

And from production log:
Started POST "/hostgroups" for 192.168.122.10 at 2013-11-06 14:04:27 +0100
Processing by HostgroupsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"5mnzHzzPgRoZQO5gP8XoodvzPYEBnAmp0zhxM4kh9E8=", "hostgroup"=>{"parent_id"=>"125", "name"=>"pgustafs2", "environment_id"=>"", "puppet_ca_proxy_id"=>"", "puppet_proxy_id"=>"", "domain_id"=>"", "architecture_id"=>"", "root_pass"=>"[FILTERED]", "location_ids"=>["", "1", ""], "organization_ids"=>["", "2", ""]}, "commit"=>"Submit"}
Operation FAILED: Validation failed: User has this hostgroup already
Rendered common/500.html.erb within layouts/application (5.6ms)
Completed 500 Internal Server Error in 168ms (Views: 9.8ms | ActiveRecord: 40.0ms)

The user is assigned an role with all permission selected.

Associated revisions

Revision de7cb887 (diff)
Added by Neil Miao about 5 years ago

fixes #3596 - validation error when user with hostgroup subscription creates a new hostgroup

Revision e46c7bc2 (diff)
Added by Neil Miao about 5 years ago

fixes #3596 - validation error when user with hostgroup subscription creates a new hostgroup

(cherry picked from commit de7cb88710f028bc33ae9257d185abf0b73554d5)

History

#1 Updated by Dominic Cleal about 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.9.1

#2 Updated by Dominic Cleal about 5 years ago

  • Legacy Backlogs Release (now unused) set to 5

#3 Updated by Neil Miao about 5 years ago

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

Also available in: Atom PDF