Project

General

Profile

Actions

Bug #19483

closed

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

Added by Dominic Cleal over 7 years ago. Updated over 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

Also available in: Atom PDF