Skip to content

Commit a109192

Browse files
committed
Only show function name for admin
1 parent 6dfaa72 commit a109192

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

routers/web/repo/commit.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ func Commits(ctx *context.Context) {
9090
commitsTagsMap, err := repo_model.FindTagsByCommitIDs(ctx, ctx.Repo.Repository.ID, commitIDs...)
9191
if err != nil {
9292
log.Error("FindTagsByCommitIDs: %v", err)
93-
ctx.Flash.Error(ctx.Tr("internal_error_skipped", "FindTagsByCommitIDs"))
93+
if ctx.IsSigned && ctx.Doer.IsAdmin {
94+
ctx.Flash.Error(ctx.Tr("internal_error_skipped", "FindTagsByCommitIDs"))
95+
} else {
96+
ctx.Flash.Error(ctx.Tr("internal_error_skipped", "Load Tags"))
97+
}
9498
} else {
9599
ctx.Data["CommitsTagsMap"] = commitsTagsMap
96100
}

0 commit comments

Comments
 (0)