mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 08:42:32 -05:00
[API] let admin check org membership on other users (#10201)
* fix * fix lint on master Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
e414fc18a9
commit
585316f3bf
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ func IsMember(ctx *context.APIContext) {
|
|||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "IsOrgMember", err)
|
||||
return
|
||||
} else if userIsMember {
|
||||
} else if userIsMember || ctx.User.IsAdmin {
|
||||
userToCheckIsMember, err := ctx.Org.Organization.IsOrgMember(userToCheck.ID)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "IsOrgMember", err)
|
||||
|
|
Loading…
Reference in a new issue