Project

General

Profile

Bug #12278

Foreman fails when creating a role if default user has 2 or more filters with same permission

Added by Marek Hulán about 4 years ago. Updated over 1 year ago.

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

Description

After https://github.com/theforeman/foreman/commit/1f5d2516f7acd537cf996aeb3f52e0bf9c17c2d7 we build a role with permissions of default user. If default user has two or more filters with same permission (valid setup), the verification of found collection fails (https://github.com/theforeman/foreman/blob/develop/app/models/role.rb#L135). We have to make the list unique.


Related issues

Related to Foreman - Refactor #12147: move rails3 compatible changes from the rails4 branch to developClosed2015-10-13

Associated revisions

Revision ea04ccca (diff)
Added by Marek Hulán almost 4 years ago

Fixes #12278 - make sure permission set is uniq for role

If default user has two or more filters with same permission (valid
setup), the verification of found collection failed. This patch
make the list uniq and the check correctly verifies whether all
permissions were found.

History

#1 Updated by Marek Hulán about 4 years ago

  • Related to Refactor #12147: move rails3 compatible changes from the rails4 branch to develop added

#2 Updated by The Foreman Bot about 4 years ago

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

#3 Updated by Marek Hulán almost 4 years ago

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

Also available in: Atom PDF