Add loading SSO user accounts to the xdmod-admin command #1974
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds the ability to initialize SSO user accounts with the role permissions. Previously in XDMoD
the only way to 'create' an SSO account is to have the user login and then once they have logged in
then their permissions can be set in the admin dashboard.
I also fixed a couple of linter errors in the xdmod-admin code (so that running the xdmod-admin command would no longer generate php warnings). The command line syntax follows
the existing style of an 'action' and 'command' (if I was starting from scratch I would probably not bother having the separate flags, but I'm not).
Motivation and Context
Needed the ability to pre-load users with the correct permissions so when they first log in to XDMoD they see the correct stuff.
Tests performed
The base code in this pull request was used in a standalone script run on NAIRR XDMoD to setup all of the RP accounts. I also added a post-install test to run the command to add a user and then check the correct rows appear in the database.