Project

General

Profile

Bug #26066

Foreman changes owner from group to user on edit

Added by Adam Winberg 3 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
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?

History

#1 Updated by Adam Winberg 3 months ago

  • Found in Releases 1.20.1 added

#2 Updated by Marek Hulán 3 months 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.

#3 Updated by Adam Winberg 3 months 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!

#4 Updated by Adam Winberg about 2 months ago

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

Also available in: Atom PDF