mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-02 13:00:10 +02:00
update AccessibleGroupCondition function to take a minimum perm.AccessMode as a parameter
This commit is contained in:
1 parent
fd394b6d2c
commit
923e84d4e5
3 files changed
+13
-15
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user