Default organizations and locations

The current pull request for orgs and locations has the following logic. https://github.com/theforeman/foreman/pull/354

  1. If a user has permission to create a new location or organization then present a page after login that asks them to create a new location or org. If the user doesn't have permission to create one, then nothing happens. A host can still be created with no location since there are no locations. If there are locations, the drop-down list for location when creating a a host does not give the option for blank. Thus, be default, the first location created is the default.
··· ----- Original Message ----- From: "David Caplan" To: foreman-dev@googlegroups.com Sent: Wednesday, January 16, 2013 8:30:50 PM Subject: [foreman-dev] Re: Default organizations and locations

Why not define a baseline organization and location that act as wildcards for searching functions. Unless explicitly modified by an authorized administrator all new hosts are placed into the baseline org and location. The location acts like a wildcard, so it always resolves.

On Friday, December 14, 2012 11:10:06 AM UTC-5, Sam Kottler wrote:

There was a brief conversation about this on IRC, but Ohad had to run so I’m moving it to the list.

New hosts are currently required to be part of an organization or location if they are enabled. This can be confusing to users because if they don’t have any orgs/locations then fields won’t get populated on the host creation page. I think there are a few ways to deal with this:

  1. Create a dummy location or organization when the features are enabled. This is probably easiest for new installations, but might be tricky for users with existing infrastructure in foreman because users will then have a location or organization they’re not familiar with and will have to change.

  2. If a user has permission to create a new location or organization then present a modal after login that asks them to create a new location or org. If the user doesn’t have permission to create one, then the modal will just say they need to contact their administrator because locations/orgs are enabled, but none exist. This is the most complicated option as I see it, but also probably the best from a usability perspective.

  3. Don’t force a location and/or organization to be selected. This would mirror the way other parts of Foreman, like hostgroups, currently work. Users that are pinned to a certain location or organization (or combo of the two) wouldn’t be able to view hosts that exist outside orgs/locations that they don’t have permission to view, including those that aren’t assigned a location or organization.

Interested to get some feedback on this!

-Sam

Continuing from previous email. I sent it by accident…

··· --------------

The current pull request for orgs and locations has the following logic: https://github.com/theforeman/foreman/pull/354

Admin Login

  1. If locations are enabled AND there are NO locations, then a page is presented to create a new location (Step 1)
  2. Then, Step 2, the admin has the option to:
    a) Assign All Hosts with No Location to "location just created"
    b) Manually Assign Host with No Location
    c) Skip Assign Hosts and Proceed to Edit Location Settings
  3. Btw, if all hosts already have locations, there is no Step 2

User Login (no permission to create location)

  1. If locations are enabled AND there are NO locations, then nothing happens. There is NO need to contact their admin. He can still create a host with no location since there are no locations. The admin can assign the host to a location when it’s created (see above)
  2. If there are locations, there is no option to leave location blank when creating a host. The first location in the drop-down list is automatically selected and thus becomes default.

More feed is welcomed,

Joseph

----- Original Message -----
From: “David Caplan” caplan.david@gmail.com
To: foreman-dev@googlegroups.com
Sent: Wednesday, January 16, 2013 8:30:50 PM
Subject: [foreman-dev] Re: Default organizations and locations

Why not define a baseline organization and location that act as wildcards for searching functions. Unless explicitly modified by an authorized administrator all new hosts are placed into the baseline org and location. The location acts like a wildcard, so it always resolves.

On Friday, December 14, 2012 11:10:06 AM UTC-5, Sam Kottler wrote:

There was a brief conversation about this on IRC, but Ohad had to run so I’m moving it to the list.

New hosts are currently required to be part of an organization or location if they are enabled. This can be confusing to users because if they don’t have any orgs/locations then fields won’t get populated on the host creation page. I think there are a few ways to deal with this:

  1. Create a dummy location or organization when the features are enabled. This is probably easiest for new installations, but might be tricky for users with existing infrastructure in foreman because users will then have a location or organization they’re not familiar with and will have to change.

  2. If a user has permission to create a new location or organization then present a modal after login that asks them to create a new location or org. If the user doesn’t have permission to create one, then the modal will just say they need to contact their administrator because locations/orgs are enabled, but none exist. This is the most complicated option as I see it, but also probably the best from a usability perspective.

  3. Don’t force a location and/or organization to be selected. This would mirror the way other parts of Foreman, like hostgroups, currently work. Users that are pinned to a certain location or organization (or combo of the two) wouldn’t be able to view hosts that exist outside orgs/locations that they don’t have permission to view, including those that aren’t assigned a location or organization.

Interested to get some feedback on this!

-Sam