Add Internal user.
(email: str, password: str,
admin: Annotated[Optional[bool],
typer.Option("--admin")] = False,
role: Optional[str] = None,
active: Annotated[Optional[bool],
typer.Option("--active/--inactive")] = True,
console: Optional[bool] = True,
json: Optional[bool] = False,
sqlite_path: Optional[str] = None,
)
| 319 | @app.command() |
| 320 | @update_sqlite_path |
| 321 | def add_user(email: str, password: str, |
| 322 | admin: Annotated[Optional[bool], |
| 323 | typer.Option("--admin")] = False, |
| 324 | role: Optional[str] = None, |
| 325 | active: Annotated[Optional[bool], |
| 326 | typer.Option("--active/--inactive")] = True, |
| 327 | console: Optional[bool] = True, |
| 328 | json: Optional[bool] = False, |
| 329 | sqlite_path: Optional[str] = None, |
| 330 | ): |
| 331 | """Add Internal user. """ |
| 332 | |
| 333 | data = { |
| 334 | 'email': email, |
| 335 | 'role': 'Administrator' if admin else role, |
| 336 | 'active': active, |
| 337 | 'auth_source': INTERNAL, |
| 338 | 'newPassword': password, |
| 339 | 'confirmPassword': password, |
| 340 | } |
| 341 | ManageUsers.create_user(data, console, json) |
| 342 | |
| 343 | @app.command() |
| 344 | @update_sqlite_path |
nothing calls this directly
no test coverage detected