@cli_app.command("<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT>", help="<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT>", help="<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT>", prompt="<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT>", prompt="<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT:user>", prompt="<STR_LIT>")<EOL>@click.option("<STR_LIT>", default="<STR_LIT>", prompt="<STR_LIT>")<EOL>@click.password_option()<EOL>def create_admin(app, appbuilder, username, firstname, lastname, email, password):
auth_type = {<EOL>c.AUTH_DB: "<STR_LIT>",<EOL>c.AUTH_OID: "<STR_LIT>",<EOL>c.AUTH_LDAP: "<STR_LIT>",<EOL>c.AUTH_REMOTE_USER: "<STR_LIT>",<EOL>c.AUTH_OAUTH: "<STR_LIT>",<EOL>}<EOL>_appbuilder = import_application(app, appbuilder)<EOL>click.echo(<EOL>click.style(<EOL>"<STR_LIT>".format(<EOL>auth_type.get(_appbuilder.sm.auth_type, "<STR_LIT>")<EOL>),<EOL>fg="<STR_LIT>",<EOL>)<EOL>)<EOL>role_admin = _appbuilder.sm.find_role(_appbuilder.sm.auth_role_admin)<EOL>user = _appbuilder.sm.add_user(<EOL>username, firstname, lastname, email, role_admin, password<EOL>)<EOL>if user:<EOL><INDENT>click.echo(click.style("<STR_LIT>".format(username), fg="<STR_LIT>"))<EOL><DEDENT>else:<EOL><INDENT>click.echo(click.style("<STR_LIT>", fg="<STR_LIT>"))<EOL><DEDENT>
Creates an admin user