mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
add comments
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user