From a7c7674b3f45875b6bfd0a7f2b55a53d08682907 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 29 Oct 2019 15:24:46 +0100 Subject: [PATCH] add comments --- routers/api/v1/repo/issue.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index e72d54f41d..3d67180120 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -658,6 +658,7 @@ func AddIssueSubscription(ctx *context.APIContext) { } } + //only admin and user for itself can change subscription if user.ID != ctx.User.ID && !ctx.User.IsAdmin { ctx.Error(403, "User", nil) return @@ -730,6 +731,7 @@ func DelIssueSubscription(ctx *context.APIContext) { } } + //only admin and user for itself can change subscription if user.ID != ctx.User.ID && !ctx.User.IsAdmin { ctx.Error(403, "User", nil) return