Skip to content

Commit

Permalink
Add case insensitivity when validating uniqueness of name of new role
Browse files Browse the repository at this point in the history
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1537171

Add case insensitivity when validating uniqueness of the name of a new role,
when creating a new role under Configuration > Access Control > Roles.
  • Loading branch information
Hilda Stastna committed Mar 23, 2018
1 parent ff6afe8 commit dd99d20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/miq_user_role.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ class MiqUserRole < ApplicationRecord

virtual_column :vm_restriction, :type => :string

validates_presence_of :name
validates_uniqueness_of :name
validates :name, :presence => true, :uniqueness => { case_sensitive: false }

serialize :settings

Expand Down

0 comments on commit dd99d20

Please sign in to comment.