update group web context

ensure we 404 if the group is not accessible
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ committed 2026-04-02 20:48:02 -04:00
1 parent b28493db6c
commit cb563434ee
1 file changed
+10
+10
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 {