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 (go-gitea#4719)
  • Loading branch information
adelowo committed Aug 21, 2018
1 parent 0665154 commit a7ef991
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 @@ -181,7 +181,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 @@ -270,7 +271,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 a7ef991

Please sign in to comment.