Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug where team with admin privelege type doesn't get any unit #4719

Merged
merged 6 commits into from
Aug 21, 2018
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