mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Fix team permission (#34128)
The `team.access_mode` should be either `none` or `admin/owner`. For non-admin team, the real permissions are provided by `team_unit`.
This commit is contained in:
@@ -78,7 +78,7 @@ func IsOrganizationAdmin(ctx context.Context, orgID, uid int64) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
for _, t := range teams {
|
||||
if t.AccessMode >= perm.AccessModeAdmin {
|
||||
if t.HasAdminAccess() {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user