Project

General

Profile

Actions

Bug #26066

open

Foreman changes owner from group to user on edit

Added by Adam Winberg about 5 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

When we create machines in Foreman I make sure that 'owner' is set to the relevant AD group so all members of this group can edit the host. But if a member of the group does edit the host, Foreman changes the owner from the group to the user - why?

Looking at the logs there's an 'update event' on 'owner_id' and 'owner_type', even though the only thing the user was doing was adding a puppetclass to the host.

2019-02-07T14:13:53 [I|app|e4b00] Current user set to a001538 (regular)
2019-02-07T14:13:53 [I|aud|e4b00] HostClass (2090) create event on puppetclass_id 232
2019-02-07T14:13:53 [I|aud|e4b00] HostClass (2090) create event on host_id 2999
2019-02-07T14:14:00 [I|app|e4b00] Processed 7 tasks from queue 'Host::Managed Main', completed 7/7
2019-02-07T14:14:00 [I|aud|e4b00] Host::Base (2999) update event on disk , 
2019-02-07T14:14:00 [I|aud|e4b00] Host::Base (2999) update event on owner_id 94, 1
2019-02-07T14:14:00 [I|aud|e4b00] Host::Base (2999) update event on owner_type Usergroup, User

So why is Foreman changing the owner of the host?

Actions #1

Updated by Adam Winberg about 5 years ago

  • Found in Releases 1.20.1 added
Actions #2

Updated by Marek Hulán about 5 years ago

Does the hser have permission to see the usergroup? It might be that they don't hence it tries to set current user which I think is the default value. That would be quite annoying bug.

Actions #3

Updated by Adam Winberg about 5 years ago

No, they dont have any usergroup permissions, didnt even think about that. I will add some view permissions and try it out, thanks for the tip!

Actions #4

Updated by Adam Winberg about 5 years ago

The issue does indeed seem to be missing permissions - thanks for the tip!

Actions

Also available in: Atom PDF