If I manually create a user via the gui, I can click the “Set login details” button so that I don’t have to assign a username and password. This is useful for provisioning profiles of our SSO users who have not logged in yet, but whom we want to be able to add to events.
But when I create a user with the indico shell, I am prompted for username and password, and cannot leave them blank. Is there an option for not assigning login details when using the shell?
My python is a little rusty, but I’ll have a look.
Here’s another, related one:
I don’t seem to be able to specify name, affiliation, etc, through the command-line options when I do ‘indico user create’
Looking at the code for user.py it has
@click.option('--first-name', '-n', help='First name of the user')
@click.option('--last-name', '-s', help='Last name of the user')
@click.option('--email', '-e', help='Email address of the user')
@click.option('--affiliation', '-a', help='Affiliation of the user')
but none of these options is recognized during user creation.
If these things were implemented, a bulk user import feature could work. Otherwise it is still typing them in one at a time, whether I use the GUI or the shell.
That’s correct; so far nobody really needed to use this to automatically create users. At least in a Python script it would be much easier to just call the create_user() util directly instead of going through the indico cli.
As soon as you need to do this in a loop for more than one user you’d also get significantly better performance, since invoking the indico cli is rather heavy/slow.