fix(templates): hide non-actionable links when not logged in

A non-logged in user cannot vote/enable notifications or submit a
request so hide these links.
This commit is contained in:
Jelle van der Waa 2024-08-09 11:21:37 +02:00
parent a16fac9b95
commit d393ed2352
No known key found for this signature in database
GPG key ID: C06086337C50773E
2 changed files with 73 additions and 66 deletions

View file

@ -507,7 +507,9 @@ def test_package_requests_display(
client: TestClient, user: User, package: Package, pkgreq: PackageRequest
):
# Test that a single request displays "1 pending request".
cookies = {"AURSID": user.login(Request(), "testPassword")}
with client as request:
request.cookies = cookies
resp = request.get(package_endpoint(package))
assert resp.status_code == int(HTTPStatus.OK)
@ -530,6 +532,7 @@ def test_package_requests_display(
# Test that a two requests display "2 pending requests".
with client as request:
request.cookies = cookies
resp = request.get(package_endpoint(package))
assert resp.status_code == int(HTTPStatus.OK)