summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-28 09:30:08 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-28 09:30:08 +0800
commit21846d16e517cf0b7f7bed5e595277aab025711f (patch)
treee3b1db5009efcdb190e5108a8f984e50135671aa /models/org.go
parent25b5722155c0dc974239f862b3990b7423e28bfb (diff)
downloadgitea-21846d16e517cf0b7f7bed5e595277aab025711f.tar.gz
gitea-21846d16e517cf0b7f7bed5e595277aab025711f.zip
golint for models/org_team.go
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/org.go b/models/org.go
index 3b04ed578c..4a81814bae 100644
--- a/models/org.go
+++ b/models/org.go
@@ -41,7 +41,7 @@ func (org *User) GetTeam(name string) (*Team, error) {
}
func (org *User) getOwnerTeam(e Engine) (*Team, error) {
- return org.getTeam(e, OWNER_TEAM)
+ return org.getTeam(e, ownerTeamName)
}
// GetOwnerTeam returns owner team of organization.
@@ -52,7 +52,7 @@ func (org *User) GetOwnerTeam() (*Team, error) {
func (org *User) getTeams(e Engine) error {
return e.
Where("org_id=?", org.ID).
- OrderBy("CASE WHEN name LIKE '" + OWNER_TEAM + "' THEN '' ELSE name END").
+ OrderBy("CASE WHEN name LIKE '" + ownerTeamName + "' THEN '' ELSE name END").
Find(&org.Teams)
}
@@ -140,8 +140,8 @@ func CreateOrganization(org, owner *User) (err error) {
// Create default owner team.
t := &Team{
OrgID: org.ID,
- LowerName: strings.ToLower(OWNER_TEAM),
- Name: OWNER_TEAM,
+ LowerName: strings.ToLower(ownerTeamName),
+ Name: ownerTeamName,
Authorize: AccessModeOwner,
NumMembers: 1,
}
@@ -150,7 +150,7 @@ func CreateOrganization(org, owner *User) (err error) {
}
if _, err = sess.Insert(&TeamUser{
- Uid: owner.ID,
+ UID: owner.ID,
OrgID: org.ID,
TeamID: t.ID,
}); err != nil {