mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
chore: ran linting
This commit is contained in:
parent
79f004bbb1
commit
bcdfd23ea1
4 changed files with 7 additions and 6 deletions
|
|
@ -204,9 +204,7 @@ class UserManager(UUIDIDMixin, BaseUserManager[User, uuid.UUID]):
|
||||||
credentials.password, user.hashed_password
|
credentials.password, user.hashed_password
|
||||||
)
|
)
|
||||||
if not verified:
|
if not verified:
|
||||||
logger.warning(
|
logger.warning(f"Failed login attempt (wrong password) for user: {user.id}")
|
||||||
f"Failed login attempt (wrong password) for user: {user.id}"
|
|
||||||
)
|
|
||||||
return None
|
return None
|
||||||
if updated_password_hash is not None:
|
if updated_password_hash is not None:
|
||||||
await self.user_db.update(user, {"hashed_password": updated_password_hash})
|
await self.user_db.update(user, {"hashed_password": updated_password_hash})
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,6 @@ export function LocalLoginForm() {
|
||||||
title: errorDetails.title,
|
title: errorDetails.title,
|
||||||
message: errorDetails.description,
|
message: errorDetails.description,
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,8 @@ export function RowActions({
|
||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
<AlertDialogTitle>Delete document?</AlertDialogTitle>
|
<AlertDialogTitle>Delete document?</AlertDialogTitle>
|
||||||
<AlertDialogDescription>
|
<AlertDialogDescription>
|
||||||
This action cannot be undone. This will permanently delete this document from your search space.
|
This action cannot be undone. This will permanently delete this document from your
|
||||||
|
search space.
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
<AlertDialogFooter>
|
<AlertDialogFooter>
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,10 @@ export function getAuthErrorMessage(errorCode: string, returnTitle: boolean = fa
|
||||||
if (!errorInfo) {
|
if (!errorInfo) {
|
||||||
const patterns = [
|
const patterns = [
|
||||||
{ pattern: /credential|password|email/i, code: "LOGIN_BAD_CREDENTIALS" },
|
{ pattern: /credential|password|email/i, code: "LOGIN_BAD_CREDENTIALS" },
|
||||||
{ pattern: /not found|no account|does not exist|user not found/i, code: "LOGIN_USER_NOT_FOUND" },
|
{
|
||||||
|
pattern: /not found|no account|does not exist|user not found/i,
|
||||||
|
code: "LOGIN_USER_NOT_FOUND",
|
||||||
|
},
|
||||||
{ pattern: /verify|verification/i, code: "LOGIN_USER_NOT_VERIFIED" },
|
{ pattern: /verify|verification/i, code: "LOGIN_USER_NOT_VERIFIED" },
|
||||||
{ pattern: /inactive|disabled|suspended/i, code: "USER_INACTIVE" },
|
{ pattern: /inactive|disabled|suspended/i, code: "USER_INACTIVE" },
|
||||||
{ pattern: /exists|duplicate/i, code: "REGISTER_USER_ALREADY_EXISTS" },
|
{ pattern: /exists|duplicate/i, code: "REGISTER_USER_ALREADY_EXISTS" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue