aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author无闻 <u@gogs.io>2015-02-13 16:25:18 -0500
committer无闻 <u@gogs.io>2015-02-13 16:25:18 -0500
commitcd6a2b78a752605d808c6392ce78b92d4759fede (patch)
tree6bfa57ebd8cf92cd64dc5517ce1625f24f74a4df
parentcdd8f7c53aa7090753495ea87fca6ca3709ac688 (diff)
parent0009a1d2b16baf1bcc9b69078853e9475662ab7f (diff)
downloadgitea-cd6a2b78a752605d808c6392ce78b92d4759fede.tar.gz
gitea-cd6a2b78a752605d808c6392ce78b92d4759fede.zip
Merge pull request #951 from phsmit/fix_team_update
Fix access for team mode update
-rw-r--r--models/org.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/models/org.go b/models/org.go
index 42b14bf072..115a062b4e 100644
--- a/models/org.go
+++ b/models/org.go
@@ -666,6 +666,11 @@ func UpdateTeam(t *Team, authChanged bool) (err error) {
return err
}
+ t.LowerName = strings.ToLower(t.Name)
+ if _, err = sess.Id(t.Id).AllCols().Update(t); err != nil {
+ return err
+ }
+
// Update access for team members if needed.
if authChanged {
if err = t.getRepositories(sess); err != nil {
@@ -679,10 +684,6 @@ func UpdateTeam(t *Team, authChanged bool) (err error) {
}
}
- t.LowerName = strings.ToLower(t.Name)
- if _, err = sess.Id(t.Id).AllCols().Update(t); err != nil {
- return err
- }
return sess.Commit()
}