Skip to content

Commit 4593393

Browse files
committed
fix logic
1 parent 1195d66 commit 4593393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/organization/team_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ func (t TeamList) LoadUnits(ctx context.Context) error {
2929
func (t TeamList) UnitMaxAccess(tp unit.Type) perm.AccessMode {
3030
maxAccess := perm.AccessModeNone
3131
for _, team := range t {
32-
if team.IsOwnerTeam() {
33-
return perm.AccessModeOwner
32+
if team.AccessMode >= perm.AccessModeAdmin {
33+
return team.AccessMode
3434
}
3535
for _, teamUnit := range team.Units {
3636
if teamUnit.Type != tp {

0 commit comments

Comments
 (0)