0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-03 16:52:10 +02:00

fix: update group assignment to fix incorrect 404s

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-12-20 15:24:02 -05:00
parent d4f6f2b952
commit 10ac130ec7
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -242,7 +242,7 @@ func groupAssignment(ctx *Context) (bool, error) {
}
ctx.RepoGroup.IsGroupAdmin = ctx.RepoGroup.IsGroupAdmin || isAdmin
}
return canAccess && (ctx.RepoGroup.IsGroupAdmin || ctx.RepoGroup.IsMember || ctx.RepoGroup.IsOwner), nil
return canAccess, nil
}
func GroupAssignment(args GroupAssignmentOptions) func(ctx *Context) {
@ -263,7 +263,7 @@ func GroupAssignment(args GroupAssignmentOptions) func(ctx *Context) {
if ctx.RepoGroup.Group.Visibility == structs.VisibleTypePrivate {
args.RequireMember = true
} else if ctx.IsSigned && !ca {
} else if ctx.IsSigned && (!ca && ctx.RepoGroup.Group.Visibility != structs.VisibleTypePublic) {
ctx.NotFound(err)
return
}