diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-06-15 10:50:12 +0800 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-06-15 04:50:12 +0200 |
commit | 31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b (patch) | |
tree | 709f6f8e6ee93e706f900d49e94a6e7b7ed1e3ed /models/repo.go | |
parent | 5b0cbf378891b82084b2cbb0e58ea628880f8c95 (diff) | |
download | gitea-31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b.tar.gz gitea-31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b.zip |
fix collborators lack of units on orgnization repositories (#1968)
* fix collborators lack of units on orgnization repositories
* also change log level to debug
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go index 8fda3c674d..47d694cdac 100644 --- a/models/repo.go +++ b/models/repo.go @@ -363,6 +363,13 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) ( return nil } + // Collaborators will not be limited + if isCollaborator, err := repo.isCollaborator(e, userID); err != nil { + return err + } else if isCollaborator { + return nil + } + teams, err := getUserTeams(e, repo.OwnerID, userID) if err != nil { return err |