translator_directory.cli
¶
Module Contents¶
Functions¶
|
Implements the fetch-users cli command. |
|
Updates the list of users by fetching matching users |
|
|
|
|
|
Updates user accounts for translators. |
Attributes¶
- translator_directory.cli.fetch_users(app: onegov.translator_directory.app.TranslatorDirectoryApp, session: sqlalchemy.orm.Session, ldap_server: str, ldap_username: str, ldap_password: str, admin_group: str, editor_group: str, verbose: bool = False, skip_deactivate: bool = False, dry_run: bool = False) None [source]¶
Implements the fetch-users cli command.
- translator_directory.cli.fetch_users_cli(ldap_server: str, ldap_username: str, ldap_password: str, admin_group: str, editor_group: str, verbose: bool, skip_deactivate: bool, dry_run: bool) Callable[[TranslatorAppRequest, TranslatorDirectoryApp], None] [source]¶
Updates the list of users by fetching matching users from a remote LDAP server.
This is currently highly specific for the Canton of Zug and therefore most values are hard-coded.
Example:
- onegov-translator –select /translator_directory/zug fetch-users
–ldap-server ‘ldaps://1.2.3.4’ –ldap-username ‘foo’ –ldap-password ‘bar’ –admin-group ‘ou=Admins’ –editor-group ‘ou=Editors’
- translator_directory.cli.drive_distances_cli(dry_run: bool, only_empty: bool, tolerance_factor: float, max_tolerance: int, max_distance: int) Callable[[TranslatorAppRequest, TranslatorDirectoryApp], None] [source]¶
- translator_directory.cli.geocode_cli(dry_run: bool, only_empty: bool) Callable[[TranslatorAppRequest, TranslatorDirectoryApp], None] [source]¶
- translator_directory.cli.update_accounts_cli(dry_run: bool) Callable[[TranslatorAppRequest, TranslatorDirectoryApp], None] [source]¶
Updates user accounts for translators.