- Updated app/integrated_crm_app.py, build.sh, conf/config.json - Added config.ini, schema.sql, send_email.py, test_db_conn.py - Added full wwwroot/ with bricks framework, all module frontends, login/main UI
16 lines
576 B
Python
16 lines
576 B
Python
#!/usr/bin/env python3
|
|
"""Temporary endpoint to fix admin password encoding"""
|
|
dbname = get_module_dbname('rbac')
|
|
encoded_pw = password_encode('admin123')
|
|
|
|
async with DBPools().sqlorContext(dbname) as sor:
|
|
await sor.sqlExe(
|
|
"UPDATE users SET password=${password}$ WHERE username='admin'",
|
|
{'password': encoded_pw}
|
|
)
|
|
# Verify
|
|
r = await sor.sqlExe("SELECT id, username, password FROM users WHERE username='admin'", {})
|
|
|
|
result = {'status': 'ok', 'encoded': encoded_pw, 'updated': len(r) if r else 0}
|
|
return json.dumps(result, ensure_ascii=False)
|