Skip to content

Commit 6a2150f

Browse files
committed
fix bug
1 parent 0ff101d commit 6a2150f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/http/api/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def signin(request: Request):
1818
user = await request.json()
1919
result = authenticate(user['username'], user['password'])
2020
if result is True:
21-
isadmin = isAdmin(user['username'], token)
21+
isadmin = isAdmin(user['username'])
2222
token = slurm_auth.makejwt(user['username'], isadmin)
2323
return {'success': True, 'token': token, 'userinfos': {'username': user['username'], 'name': user['username'], "isAdmin": isadmin}}
2424
else:
@@ -41,7 +41,7 @@ async def signin(request: Request):
4141

4242
def isAdmin(username, newToken=None):
4343
if newToken is None:
44-
newToken = slurm_auth.makejwt(username)
44+
newToken = slurm_auth.makejwt(username, False)
4545
headers = {
4646
"Content-type": "application/json",
4747
"X-SLURM-USER-NAME": username,

0 commit comments

Comments
 (0)