user.cli
Provides commands used to manage users.
Attributes
Functions
|
Adds a user with the given name to the database. |
|
Removes the given user from the database. |
|
Returns 0 if the user exists, 1 if it doesn't when recursive equals |
|
Activates the given user. |
|
Deactivates the given user. |
|
Logs out the given user on all sessions. |
|
Logs out all users on all sessions. |
|
Lists all users. |
|
Changes the password of the given username. |
|
Changes the yubikey of the given username. |
|
Changes the yubikey of the given username. |
|
Changes the yubikey of the given username. |
|
Transfers the Yubikey from one user to another. |
|
Changes the role of the given username. |
|
Lists all sessions of all users. |
Module Contents
- user.cli.add(role: str, username: str, password: str | None, yubikey: str | None, no_prompt: bool, realname: str | None, phone_number: str | None) Callable[[CoreRequest, Framework], None] [source]
Adds a user with the given name to the database.
- user.cli.delete(username: str) Callable[[CoreRequest, Framework], None] [source]
Removes the given user from the database.
- user.cli.exists(username: str, recursive: bool) Callable[[CoreRequest, Framework], None] [source]
Returns 0 if the user exists, 1 if it doesn’t when recursive equals to False. If the recursive flag is set, it will loop over all schemas and print the result for each schema without return value.
- user.cli.activate(username: str) Callable[[CoreRequest, Framework], None] [source]
Activates the given user.
- user.cli.deactivate(username: str) Callable[[CoreRequest, Framework], None] [source]
Deactivates the given user.
- user.cli.logout(username: str) Callable[[CoreRequest, Framework], None] [source]
Logs out the given user on all sessions.
- user.cli.logout_all() Callable[[CoreRequest, Framework], None] [source]
Logs out all users on all sessions.
- user.cli.list(active_only: bool, inactive_only: bool, sources: bool) Callable[[CoreRequest, Framework], None] [source]
Lists all users.
- user.cli.change_password(username: str, password: str | None) Callable[[CoreRequest, Framework], None] [source]
Changes the password of the given username.
- user.cli.change_yubikey(username: str, yubikey: str | None) Callable[[CoreRequest, Framework], None] [source]
Changes the yubikey of the given username.
- user.cli.change_mtan(username: str, phone_number: str | None) Callable[[CoreRequest, Framework], None] [source]
Changes the yubikey of the given username.
- user.cli.change_totp(username: str, secret: str | None, generate: bool) Callable[[CoreRequest, Framework], None] [source]
Changes the yubikey of the given username.
- user.cli.transfer_yubikey(source: str, target: str) Callable[[CoreRequest, Framework], None] [source]
Transfers the Yubikey from one user to another.
- user.cli.change_role(username: str, role: str) Callable[[CoreRequest, Framework], None] [source]
Changes the role of the given username.
- user.cli.list_sessions() Callable[[CoreRequest, Framework], None] [source]
Lists all sessions of all users.