From 6c41c76d444a6ed1b7615c9c4262a2cdd8527337 Mon Sep 17 00:00:00 2001 From: Asher <74266156+AsherRodriguez@users.noreply.github.com> Date: Wed, 29 May 2024 14:53:49 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20|=20Changed=20permissio?= =?UTF-8?q?ns=20for=20users=20to=20be=20able=20to=20delete=20their=20own?= =?UTF-8?q?=20bleets=20w/o=20administrator=20permissions=20(#1933)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Bug closes: [#1928](https://github.com/SnailyCAD/snaily-cadv4/issues/1928) Fixed it so the logic allows you to delete your own bleets w/o admin perms --- apps/api/src/controllers/bleeter/bleeter-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/controllers/bleeter/bleeter-controller.ts b/apps/api/src/controllers/bleeter/bleeter-controller.ts index adb1f837e..d3a14234a 100644 --- a/apps/api/src/controllers/bleeter/bleeter-controller.ts +++ b/apps/api/src/controllers/bleeter/bleeter-controller.ts @@ -214,7 +214,7 @@ export class BleeterController { throw new NotFound("notFound"); } - if (post.userId !== user.id || !hasAdminPermissions) { + if (post.userId !== user.id && !hasAdminPermissions) { throw new Forbidden("notAllowedToDelete"); }