Project

General

Profile

Actions

Bug #5431

open

Host created outside org/location when user doesn't have view permissions

Added by Laurent Domb over 10 years ago. Updated over 10 years ago.

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

Description

1. Create Organization A and Organization B
2. Add user A to oraganization A and B to Org B
3. Login as user A
4. Create a new Host with the VMware provider with a new image clone
5. When the machine is installed it gets removed from the organization and does only appear under Any Context instead of belonging to org A.

Actions #1

Updated by Ohad Levy over 10 years ago

is this specific to vmware? or any host for that matter (that you clone)?

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Need more information

Please run Foreman with debugging enabled and upload a log of the whole session. The SQL logs should identify where the organisation is being changed. I'd be particularly interested in anything Puppet related, as we added some multi-org support there.

http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging

Actions #3

Updated by Laurent Domb over 10 years ago

Hey,

Thanks for the help on the IRC channel yesterday. I solved the problem by adding the correct rules to the users. I still think that the way it works is not intuitive and can be improved.

Here are the steps I took to create the vmware host (reproduce the failure).

1. Create Organization A and Organization B
2. Add usera to oraganization A and userb to Org B
3. Add compute resource vmware to org A and org B
4. Add compute_resource, create_hosts, view_hosts role rights to both userb and userb
3. Login as usera
4. Create a new Host with the VMware provider with a new image clone.

Now I should NOT be able to create this machine but I am. As the role to add a machine to the Org was not added yet to the users.
So when the machine gets created it does not belong to any org. The drop down field org (is only visible if you add org rules to the user) and as a result you are going to get HOST NOT FOUND where id = .... after the machine gets build. Which makes sense as it does not belong to any org.

The machine will be visible in the Any Context.

Actions #4

Updated by Dominic Cleal over 10 years ago

  • Subject changed from Organization and vmware host creation to Host created outside org/location when user doesn't have view permissions
  • Status changed from Need more information to New
  • Translation missing: en.field_release deleted (4)
Actions

Also available in: Atom PDF