|
@ -119,15 +119,9 @@ def reset_password(email: str): |
|
|
raise ApiException(status=resp.status_code, reason=resp.reason, http_resp='Form submission failed.') |
|
|
raise ApiException(status=resp.status_code, reason=resp.reason, http_resp='Form submission failed.') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
import config |
|
|
# default configuration |
|
|
HOST = config.HOST |
|
|
HOST = "https://git.vakabus.cz/api/v1" |
|
|
ADMIN_TOKEN = config.ADMIN_TOKEN |
|
|
try: |
|
|
|
|
|
with open('config.py') as f: |
|
|
|
|
|
conf = f.read() |
|
|
|
|
|
exec(conf) |
|
|
|
|
|
except Exception: |
|
|
|
|
|
print(text_orange('Nepodarilo se nacist konfiguraci ze souboru \'config.py\'')) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@click.command() |
|
|
@click.command() |
|
@ -144,12 +138,14 @@ def register(username: str, seminar: str, fullname: str, email: str, host, admin |
|
|
Prvni probehne kontrola stavu systemu, zda je mozne uzivatele bezpecne zalozit. Pote se provede pokus o zalozeni |
|
|
Prvni probehne kontrola stavu systemu, zda je mozne uzivatele bezpecne zalozit. Pote se provede pokus o zalozeni |
|
|
nasledovan pridanim uzivatele do skupiny 'org' v pozadovane organizaci (jmeno dle seminare). |
|
|
nasledovan pridanim uzivatele do skupiny 'org' v pozadovane organizaci (jmeno dle seminare). |
|
|
|
|
|
|
|
|
Vytvoreny uzivatel ma nastavene nahodne heslo. Zadny email o vytvoreni uctu neni zaslan. |
|
|
Vytvoreny uzivatel ma nastavene nahodne heslo. To je automaticky resetovano a o tom je odeslan email. |
|
|
|
|
|
|
|
|
|
|
|
V souboru config.py je mozne nastavit token a URL perzistentne. |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
api_client = ApiClient() |
|
|
api_client = ApiClient() |
|
|
api_client.configuration.host = HOST |
|
|
api_client.configuration.host = host if host is not None else HOST |
|
|
api_client.configuration.api_key = {'token': admin_token} |
|
|
api_client.configuration.api_key = {'token': admin_token if admin_token is not None else ADMIN_TOKEN} |
|
|
|
|
|
|
|
|
admin_api = AdminApi(api_client) |
|
|
admin_api = AdminApi(api_client) |
|
|
user_api = UserApi(api_client) |
|
|
user_api = UserApi(api_client) |
|
|