Bug #26066
openForeman changes owner from group to user on edit
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?
Updated by Marek Hulán about 6 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.
Updated by Adam Winberg about 6 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!
Updated by Adam Winberg almost 6 years ago
The issue does indeed seem to be missing permissions - thanks for the tip!