-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #37014 - set correct Host owner during registration #9970
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you check for the permission to imitate the specified user?
organization: (organization || User.current.default_organization || User.current.my_organizations.first), | ||
location: (location || User.current.default_location || User.current.my_locations.first), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be applied to user
instead of User.current
now?
Add the `owner_id` parameter to the Host registration command.
Is this change safe? Do we want to allow anyone to alter the owner ID through the API? How about setting |
How is this allowed? If a user has permission to generate the registration command, they should also have permission to set the owner ID as part of it.
How would that solve the issue? |
I've noticed that the generated curl command doesn't include the |
Are they? I mean, we don't state that anywhere.
How come? We authenticate by the |
A user who has permissions to generate the registration command and view users should also have permission to set the
On downstream, the current user is the Anonymous Admin. TBH, I'm not sure how it works. If you think that should be fixed, I will look into it. |
My guess is that it's coming from the Katello and the import of the host from the subman's facts. But I wasn't able to find it where exactly it's happening. But from my testing, adding |
You are right. Fixed the issue for me as well. Thanks for the help! |
Add the
owner_id
parameter to the Host registration command.