Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-26 03:36:10 +01:00

add comments

This commit is contained in:
6543 2019-10-29 15:24:46 +01:00
parent deaf69c801
commit a7c7674b3f
No known key found for this signature in database
GPG key ID: A1CA74D27FD13271

View file

@ -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 { if user.ID != ctx.User.ID && !ctx.User.IsAdmin {
ctx.Error(403, "User", nil) ctx.Error(403, "User", nil)
return 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 { if user.ID != ctx.User.ID && !ctx.User.IsAdmin {
ctx.Error(403, "User", nil) ctx.Error(403, "User", nil)
return return