summaryrefslogtreecommitdiffstats
path: root/routers/org
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2018-08-21 18:02:32 +0100
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-08-21 13:02:32 -0400
commit6ca8fbd2f94a1a02e1776a1d62ad2fb897839e47 (patch)
tree2155a1e362187e82d4917c6c007ad279d9e98a20 /routers/org
parent05dcfcfc33fb91416b6342439f4abf58b316cfef (diff)
downloadgitea-6ca8fbd2f94a1a02e1776a1d62ad2fb897839e47.tar.gz
gitea-6ca8fbd2f94a1a02e1776a1d62ad2fb897839e47.zip
Fixed bug where team with admin privelege type doesn't get any unit attached to the team (#4719)
Diffstat (limited to 'routers/org')
-rw-r--r--routers/org/teams.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index da6d81938a..1aee99fb88 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -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{
@@ -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{