Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Commit 3d124ea

Browse files
force redownloading deps
1 parent ddcbb08 commit 3d124ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ python-jose
2626
python-multipart
2727
pytz
2828
requests
29+
six
2930
rsa
3031
SQLAlchemy
31-
six
3232
sqlparse
3333
starlette
3434
urllib3

src/opencdms_api/middleware.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ def extract_resource_from_path(string, sep, start, end):
9898
request.method.lower()
9999
)
100100

101-
if (not required_role) or (self.get_climsoft_role_for_username(user.username) in required_role):
101+
has_required_role = (
102+
self.get_climsoft_role_for_username(user.username) in required_role
103+
)
104+
if (not required_role) or has_required_role:
102105
await self.app(scope, receive, send)
103106
else:
104107
raise HTTPException(status_code=403)

0 commit comments

Comments
 (0)