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
commit 544585afd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)