diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-13 23:12:33 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-13 23:12:33 +0200 |
commit | 0009a1d2b16baf1bcc9b69078853e9475662ab7f (patch) | |
tree | 6bfa57ebd8cf92cd64dc5517ce1625f24f74a4df | |
parent | cdd8f7c53aa7090753495ea87fca6ca3709ac688 (diff) | |
download | gitea-0009a1d2b16baf1bcc9b69078853e9475662ab7f.tar.gz gitea-0009a1d2b16baf1bcc9b69078853e9475662ab7f.zip |
Fix access for team mode update
-rw-r--r-- | models/org.go | 9 |
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() } |