fix: frontend: couldn't log in with an account without admin access

Massimo Melina committed Mar 30, 2022 at 10:42 UTC 64db0f433998a67ef8aa8f5878b6c3cab2743f29
2 files changed +1 -3
server/src/api.auth.ts
-3
@@ -65,9 +65,6 @@ export const loginSrp1: ApiHandler = async ({ username }, ctx) => {
65 return new ApiError(401)
66 if (!account.srp)
67 return new ApiError(406) // unacceptable
68 - if (!getFromAccount(account, a => a.admin))
69 - return new ApiError(FORBIDDEN)
70 -
68 const [salt, verifier] = account.srp.split('|')
69 const step1 = await srpSession.step1(account.username, BigInt(salt), BigInt(verifier))
70 const sid = Math.random()
todo.md
+1
@@ -1,4 +1,5 @@
1 # To do
2 +- watch certificates for change
3 - admin/fs: render virtual folders differently
4 - admin/logs
5 - admin/config: hide advanced settings