connect fix 4
This commit is contained in:
@ -219,12 +219,18 @@ async def test_credentials_manage_role_grants_non_admin_write_access(client):
|
||||
assert resp.status_code == 200, resp.text
|
||||
assert resp.json()["rdp_credentials_set"] is False
|
||||
|
||||
resp = await client.put(f"/admin/hosts/{host_id}/rdp-credentials", json={"password": "s3hr-geheim!!"})
|
||||
# Benutzername gehoert seit Migration 0010 zu den Zugangsdaten und ist
|
||||
# beim Setzen Pflicht (siehe tests/test_phase12.py).
|
||||
resp = await client.put(
|
||||
f"/admin/hosts/{host_id}/rdp-credentials",
|
||||
json={"password": "s3hr-geheim!!", "username": "Administrator"},
|
||||
)
|
||||
assert resp.status_code == 200, resp.text
|
||||
|
||||
resp = await client.get(f"/admin/hosts/{host_id}/credentials")
|
||||
assert resp.status_code == 200, resp.text
|
||||
assert resp.json()["rdp_credentials_set"] is True
|
||||
assert resp.json()["rdp_credentials_username"] == "Administrator"
|
||||
|
||||
# Ein User OHNE diese Rolle bleibt weiterhin ausgesperrt.
|
||||
client.cookies.clear()
|
||||
|
||||
Reference in New Issue
Block a user