summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-13 23:12:33 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-13 23:12:33 +0200
commit0009a1d2b16baf1bcc9b69078853e9475662ab7f (patch)
tree6bfa57ebd8cf92cd64dc5517ce1625f24f74a4df
parentcdd8f7c53aa7090753495ea87fca6ca3709ac688 (diff)
downloadgitea-0009a1d2b16baf1bcc9b69078853e9475662ab7f.tar.gz
gitea-0009a1d2b16baf1bcc9b69078853e9475662ab7f.zip
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()
}