Skip to content

Commit

Permalink
Fixed bug where team with admin privelege type doesn't get any unit a…
Browse files Browse the repository at this point in the history
…ttached to the team (#4719)
  • Loading branch information
adelowo authored and techknowlogick committed Aug 21, 2018
1 parent 05dcfcf commit 6ca8fbd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routers/org/teams.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
Description: form.Description,
Authorize: models.ParseAccessMode(form.Permission),
}
if t.Authorize < models.AccessModeAdmin {

if t.Authorize < models.AccessModeOwner {
var units = make([]*models.TeamUnit, 0, len(form.Units))
for _, tp := range form.Units {
units = append(units, &models.TeamUnit{
Expand Down Expand Up @@ -275,7 +276,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
}
}
t.Description = form.Description
if t.Authorize < models.AccessModeAdmin {
if t.Authorize < models.AccessModeOwner {
var units = make([]models.TeamUnit, 0, len(form.Units))
for _, tp := range form.Units {
units = append(units, models.TeamUnit{
Expand Down

0 comments on commit 6ca8fbd

Please sign in to comment.