Skip to content

Commit ff0155d

Browse files
committed
Make it possible to specify the dummy team
1 parent ad4b397 commit ff0155d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code_submitter/auth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ async def authenticate(
6161

6262

6363
class DummyBackend(BasicAuthBackend):
64+
def __init__(self, team: str = 'SRZ') -> None:
65+
self.team = team
66+
6467
async def validate(self, username: str, password: str) -> ValidationResult:
6568
if not username:
6669
raise AuthenticationError("Must provide a username")
6770
if not password:
6871
raise AuthenticationError("Must provide a password")
69-
return ['authenticated'], User(username, 'SRZ')
72+
return ['authenticated'], User(username, self.team)

0 commit comments

Comments
 (0)