Skip to content

Commit 5807b8c

Browse files
committed
fix lint
1 parent bc65c9a commit 5807b8c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

routers/web/repo/issue.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -1253,16 +1253,16 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
12531253
if !poster.IsAdmin {
12541254
roleDescriptor = roleDescriptor.WithRole(issues_model.RoleDescriptorOwner)
12551255
return roleDescriptor, nil
1256-
} else {
1257-
// Otherwise check if poster is the real repo admin.
1258-
ok, err := access_model.IsUserRealRepoAdmin(repo, poster)
1259-
if err != nil {
1260-
return issues_model.RoleDescriptorNone, err
1261-
}
1262-
if ok {
1263-
roleDescriptor = roleDescriptor.WithRole(issues_model.RoleDescriptorOwner)
1264-
return roleDescriptor, nil
1265-
}
1256+
}
1257+
1258+
// Otherwise check if poster is the real repo admin.
1259+
ok, err := access_model.IsUserRealRepoAdmin(repo, poster)
1260+
if err != nil {
1261+
return issues_model.RoleDescriptorNone, err
1262+
}
1263+
if ok {
1264+
roleDescriptor = roleDescriptor.WithRole(issues_model.RoleDescriptorOwner)
1265+
return roleDescriptor, nil
12661266
}
12671267
}
12681268

@@ -1280,7 +1280,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
12801280
}
12811281

12821282
// If the poster is the collaborator of the repo
1283-
if isCollaborator, err := repo_model.IsCollaborator(ctx, repo.ID, poster.ID); err != err {
1283+
if isCollaborator, err := repo_model.IsCollaborator(ctx, repo.ID, poster.ID); err != nil {
12841284
return issues_model.RoleDescriptorNone, err
12851285
} else if isCollaborator {
12861286
roleDescriptor = roleDescriptor.WithRole(issues_model.RoleDescriptorCollaborator)

0 commit comments

Comments
 (0)