mirror of https://codeberg.org/forgejo/forgejo.git
Do requested changes
This commit is contained in:
parent
ca322654c1
commit
a1b1e6c279
|
@ -175,7 +175,7 @@ func DeleteStarListByID(ctx context.Context, id int64) error {
|
|||
}
|
||||
|
||||
// LoadRepositoryCount loads just the RepositoryCount.
|
||||
// The count checks if how many repos in the list the actor is able to see.
|
||||
// The count checks how many repos in the list the actor is able to see.
|
||||
func (starList *StarList) LoadRepositoryCount(ctx context.Context, actor *user_model.User) error {
|
||||
count, err := CountRepository(ctx, &SearchRepoOptions{Actor: actor, StarListID: starList.ID})
|
||||
if err != nil {
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
|
@ -26,6 +27,11 @@ func ShowStarList(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
if !user_model.IsUserVisibleToViewer(ctx, ctx.ContextUser, ctx.Doer) {
|
||||
ctx.NotFound("user", fmt.Errorf(ctx.ContextUser.Name))
|
||||
return
|
||||
}
|
||||
|
||||
shared_user.PrepareContextForProfileBigAvatar(ctx)
|
||||
|
||||
err := shared_user.LoadHeaderCount(ctx)
|
||||
|
|
Loading…
Reference in New Issue