summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorFlorian Kaiser <florian.kaiser@fnkr.net>2016-02-04 17:08:25 +0000
committerFlorian Kaiser <florian.kaiser@fnkr.net>2016-02-04 17:08:25 +0000
commitfb1708e1afefa86b11ef9464796896bcc8dbc7e8 (patch)
treee1c5fcfdde7ae66a813890a2a04f708f04dc3b85 /models/org.go
parentbead46363bbd0f0b8cc42535c231cb2132bc5161 (diff)
downloadgitea-fb1708e1afefa86b11ef9464796896bcc8dbc7e8.tar.gz
gitea-fb1708e1afefa86b11ef9464796896bcc8dbc7e8.zip
Remove unnecessary private functions
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go20
1 files changed, 6 insertions, 14 deletions
diff --git a/models/org.go b/models/org.go
index 9254709a26..91a47e3166 100644
--- a/models/org.go
+++ b/models/org.go
@@ -1030,7 +1030,9 @@ func RemoveOrgRepo(orgID, repoID int64) error {
return removeOrgRepo(x, orgID, repoID)
}
-func (org *User) getUserRepositories(userID int64) (err error) {
+// GetUserRepositories gets all repositories of an organization,
+// that the user with the given userID has access to.
+func (org *User) GetUserRepositories(userID int64) (err error) {
teams := make([]*Team, 0, 10)
if err := x.Cols("`team`.id").
Where("`team_user`.org_id=?", org.Id).
@@ -1068,13 +1070,9 @@ func (org *User) getUserRepositories(userID int64) (err error) {
return
}
-// GetUserRepositories gets all repositories of an organization,
-// that the user with the given userID has access to.
-func (org *User) GetUserRepositories(userID int64) error {
- return org.getUserRepositories(userID)
-}
-
-func (org *User) getUserTeams(userID int64) (err error) {
+// GetTeams returns all teams that belong to organization,
+// and that the user has joined.
+func (org *User) GetUserTeams(userID int64) (err error) {
if err := x.Cols("`team`.*").
Where("`team_user`.org_id=?", org.Id).
And("`team_user`.uid=?", userID).
@@ -1087,9 +1085,3 @@ func (org *User) getUserTeams(userID int64) (err error) {
return
}
-
-// GetTeams returns all teams that belong to organization,
-// and that the user has joined.
-func (org *User) GetUserTeams(userID int64) error {
- return org.getUserTeams(userID)
-}