-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Let an organization admin to add new users to it's tower organization #11655
Conversation
Addresses issue #8982 |
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.
I think this looks good, addresses the issue, and give some flexibility for user creation.
I'm pretty sure this PR is going to fail the completness test (awx_collection/test/awx/test_completeness.py) because organization is not part of the UI api options page. You will need to modify the field no_api_parameter_ok for users to add in organization. i.e. change
to:
|
Hi! is there anything pending I can do to improve the PR? |
One thing I just thought of is that I'm pretty sure the tests run as admin. Because of this, in your additional test you have effectively tested that an admin user can run the module using the org field but we haven't tested that these changes will work for an org admin trying to create a user as intended. It will be some work but it would be nice if you created a new org admin, get a token for it and then use the token to do an assertion that they can't create a user (w/o org param) and then do an assertion that they can create a user (w/ the org param). Let me know if you need any help with this. |
Done, instead of creating a token, I've used directly a username and password for the newly created user. |
@ivarmu One last linting error and then we can merge this. |
Fixed! 😅 |
SUMMARY
Let an organization admin to add new users to it's tower organization. An organization admin must be able to create new users to it's organization (and Tower)
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
BEFORE:
AFTER: