Project

General

Profile

Actions

Bug #19483

closed

User with inherited admin flag cannot see environments outside org/locs during import

Added by Dominic Cleal almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The change in #18995 includes a conditional to User#visible_environments to return envs with no match to associated locations and organizations:

https://github.com/theforeman/foreman/commit/f4b7c52fe4012592656c0fcd56bcdd09e3ea246a#diff-4676c008b11a5480d73d4a6de01e45b9R410

This uses the condition User.current.admin, but it should use User.current.admin?, which is the method that returns inherited admin flags. The #admin method is the attribute, so this would only work for admin users with the flag explicitly set.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #18995: Puppet class import removes existing environments when orgs/locations are disabledClosedDaniel Lobato Garcia03/23/2017Actions
Actions #1

Updated by Dominic Cleal almost 7 years ago

  • Related to Bug #18995: Puppet class import removes existing environments when orgs/locations are disabled added
Actions #2

Updated by The Foreman Bot almost 7 years ago

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

Updated by Dominic Cleal almost 7 years ago

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

Also available in: Atom PDF