teams: editors can't remove the last admin from a team.
This commit is contained in:
@@ -10,6 +10,7 @@ var (
|
||||
ErrTeamNotFound = errors.New("Team not found")
|
||||
ErrTeamNameTaken = errors.New("Team name is taken")
|
||||
ErrTeamMemberNotFound = errors.New("Team member not found")
|
||||
ErrLastTeamAdmin = errors.New("Not allowed to remove last admin")
|
||||
ErrNotAllowedToUpdateTeam = errors.New("User not allowed to update team")
|
||||
ErrNotAllowedToUpdateTeamInDifferentOrg = errors.New("User not allowed to update team in another org")
|
||||
)
|
||||
|
||||
@@ -42,9 +42,10 @@ type UpdateTeamMemberCommand struct {
|
||||
}
|
||||
|
||||
type RemoveTeamMemberCommand struct {
|
||||
OrgId int64 `json:"-"`
|
||||
UserId int64
|
||||
TeamId int64
|
||||
OrgId int64 `json:"-"`
|
||||
UserId int64
|
||||
TeamId int64
|
||||
ProtectLastAdmin bool `json:"-"`
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
|
||||
Reference in New Issue
Block a user