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:
parent
b28493db6c
commit
cb563434ee
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user