update AccessibleGroupCondition function to take a minimum perm.AccessMode as a parameter

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ committed 2026-04-02 20:00:53 -04:00
1 parent fd394b6d2c
commit 923e84d4e5
3 files changed
+13 -15

No files matched your search

+2 -6
View File
@@ -507,12 +507,8 @@ func reqGroupMembership(mode perm.AccessMode, needsCreatePerm bool) func(ctx *co
ctx.APIErrorInternal(err)
return
}
var canAccess bool
if ctx.IsSigned {
canAccess, err = g.CanAccessAtLevel(ctx, ctx.Doer.ID, mode)
} else {
canAccess, err = g.CanAccessAtLevel(ctx, 0, mode)
}
canAccess, err := g.CanAccessAtLevel(ctx, ctx.Doer, mode)
if err != nil {
ctx.APIErrorInternal(err)
return