mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 00:21:17 +00:00
Backport #25214 by @KN4CK3R
The ghost user leads to inclusion of limited users/orgs in
`BuildCanSeeUserCondition`.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
(cherry picked from commit a9ebf911fa
)
This commit is contained in:
parent
a87c620d99
commit
38e5589bd6
|
@ -271,6 +271,10 @@ func GetRepositories(ctx context.Context, actor *user_model.User, n int, last st
|
||||||
cond = cond.And(builder.Gt{"package_property.value": strings.ToLower(last)})
|
cond = cond.And(builder.Gt{"package_property.value": strings.ToLower(last)})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if actor.IsGhost() {
|
||||||
|
actor = nil
|
||||||
|
}
|
||||||
|
|
||||||
cond = cond.And(user_model.BuildCanSeeUserCondition(actor))
|
cond = cond.And(user_model.BuildCanSeeUserCondition(actor))
|
||||||
|
|
||||||
sess := db.GetEngine(ctx).
|
sess := db.GetEngine(ctx).
|
||||||
|
|
Loading…
Reference in a new issue