From 0383cdf407d47c53850aa6430ceb4fb9e9864b57 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 4 Aug 2024 22:24:41 +0800 Subject: [PATCH] :passport_control: Add permission node at create reactions --- pkg/internal/server/api/posts_api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/server/api/posts_api.go b/pkg/internal/server/api/posts_api.go index 1f8f074..608d71c 100644 --- a/pkg/internal/server/api/posts_api.go +++ b/pkg/internal/server/api/posts_api.go @@ -135,7 +135,7 @@ func deletePost(c *fiber.Ctx) error { } func reactPost(c *fiber.Ctx) error { - if err := gap.H.EnsureAuthenticated(c); err != nil { + if err := gap.H.EnsureGrantedPerm(c, "CreateReactions", true); err != nil { return err } user := c.Locals("user").(models.Account)