Prior to upgrade, org admins could create and edit repos. Now, an org admin can create a repo successfully, but if they attempt to change any attribute (Upstream URL, Verify SSL, etc.) the error “undefined method ‘id’ for nil:nilClass” pops up. Full Admin users can make the change.
Org admins should be able to edit repo attributes.
Foreman and Proxy versions:
Foreman 2.3.5, Foreman-proxy-2.3.5
Foreman and Proxy plugin versions:
Distribution and version:
Other relevant data:
See attached log. Ends with 500 Internal Server error. QA system upgraded as well, but not experiencing this issue.foreman-production.log (163.8 KB)
Also confirmed that this isn’t tied to one particular org, it occurs in any org.
A colleague mentioned that we likely addressed it in Katello 4.2: Bug #33286: '"NoMethodError: undefined method `id\' for nil:NilClass" error while creating a repository.' - Katello - Foreman
The reason for the issue could be that you have a Location set (see the top of the page when you’re performing the update). A workaround would be to add that particular Location to your Smart Proxy.
Thanks for the reply. Unfortunately, the location defined was already on the Smart Proxy. However, I experimented and seem to have found a solution. I have been using the built-in ‘org admin’ role as-is for several years with no issue. But when I looked at it today, I noticed there is a little cursor pop-up note that says if you want to use the ‘org admin’ role to delegate management of a specific org to a user, you should clone the role and assign it to the org/location.
I tried that, and magic…the cloned ‘org admin’ role has no issues. Updates work without error. I just don’t understand how I got away with the original role for so long with no issues if that was a known requirement. I’ll just update my org admins to the new cloned role.