@@ -55,7 +55,7 @@ func GetIssueCommentReactions(ctx *context.APIContext) {
5555 return
5656 }
5757
58- if ! ctx .Repo .CanRead (models .UnitTypeIssues ) && ! ctx . User . IsAdmin {
58+ if ! ctx .Repo .CanRead (models .UnitTypeIssues ) {
5959 ctx .Error (http .StatusForbidden , "GetIssueCommentReactions" , errors .New ("no permission to get reactions" ))
6060 return
6161 }
@@ -179,7 +179,7 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp
179179 ctx .Error (http .StatusInternalServerError , "comment.LoadIssue() failed" , err )
180180 }
181181
182- if comment .Issue .IsLocked && ! ctx .Repo .CanWrite (models .UnitTypeIssues ) && ! ctx . User . IsAdmin {
182+ if comment .Issue .IsLocked && ! ctx .Repo .CanWrite (models .UnitTypeIssues ) {
183183 ctx .Error (http .StatusForbidden , "ChangeIssueCommentReaction" , errors .New ("no permission to change reaction" ))
184184 return
185185 }
@@ -261,7 +261,7 @@ func GetIssueReactions(ctx *context.APIContext) {
261261 return
262262 }
263263
264- if ! ctx .Repo .CanRead (models .UnitTypeIssues ) && ! ctx . User . IsAdmin {
264+ if ! ctx .Repo .CanRead (models .UnitTypeIssues ) {
265265 ctx .Error (http .StatusForbidden , "GetIssueReactions" , errors .New ("no permission to get reactions" ))
266266 return
267267 }
@@ -380,7 +380,7 @@ func changeIssueReaction(ctx *context.APIContext, form api.EditReactionOption, i
380380 return
381381 }
382382
383- if issue .IsLocked && ! ctx .Repo .CanWrite (models .UnitTypeIssues ) && ! ctx . User . IsAdmin {
383+ if issue .IsLocked && ! ctx .Repo .CanWrite (models .UnitTypeIssues ) {
384384 ctx .Error (http .StatusForbidden , "ChangeIssueCommentReaction" , errors .New ("no permission to change reaction" ))
385385 return
386386 }
0 commit comments