Merge pull request #315 from linkwarden/dev

Dev
This commit is contained in:
Daniel
2023-11-24 21:22:49 +03:30
committed by GitHub
+5 -1
View File
@@ -53,7 +53,11 @@ export default async function Index(req: NextApiRequest, res: NextApiResponse) {
.send("File inaccessible.");
}
if (user.username && !whitelistedUsernames?.includes(user.username)) {
if (
user.username &&
!whitelistedUsernames?.includes(user.username) &&
targetUser.id !== user.id
) {
return res
.setHeader("Content-Type", "text/plain")
.status(400)