0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-06 00:59:45 +02:00

update group web context

ensure we 404 if the group is not accessible
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-11-30 14:24:40 -05:00
parent b28493db6c
commit cb563434ee
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -106,6 +106,16 @@ func GroupAssignment(args GroupAssignmentOptions) func(ctx *Context) {
ctx.NotFound(err)
return
}
canAccess, err := ctx.RepoGroup.Group.CanAccess(ctx, ctx.Doer)
if err != nil {
ctx.ServerError("error checking group access", err)
return
}
if !canAccess {
ctx.NotFound(nil)
return
}
if ctx.RepoGroup.Group.Visibility == structs.VisibleTypePrivate {
args.RequireMember = true
} else if ctx.IsSigned && ctx.Doer.IsRestricted {