File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -479,12 +479,11 @@ func reqOwner() func(ctx *context.APIContext) {
479479// reqSelfOrAdmin doer should be the same as the contextUser or site admin
480480func reqSelfOrAdmin () func (ctx * context.APIContext ) {
481481 return func (ctx * context.APIContext ) {
482- if ctx .ContextUser .IsIndividual () {
483- if ! ctx .IsUserSiteAdmin () && ctx .ContextUser != ctx .Doer {
484- ctx .Error (http .StatusForbidden , "reqSelfOrAdmin" , "doer should be the site admin or be same as the contextUser" )
485- return
486- }
482+ if ! ctx .IsUserSiteAdmin () && ctx .ContextUser != ctx .Doer {
483+ ctx .Error (http .StatusForbidden , "reqSelfOrAdmin" , "doer should be the site admin or be same as the contextUser" )
484+ return
487485 }
486+
488487 }
489488}
490489
You can’t perform that action at this time.
0 commit comments