diff options
author | Unknwon <u@gogs.io> | 2017-02-23 16:15:25 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-23 16:15:25 -0500 |
commit | b78e03934d057bdb4c628fefb364dda6eb1f260a (patch) | |
tree | 79fe27f1a575f088a45b658709dac1f07eb0e9fc /models/repo.go | |
parent | 3c0d162961d3704c5a98f0f0606fbb95971db358 (diff) |
models/access: hasAccess only need userID not user object
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index 67adf20d..dfa04d88 100644 --- a/models/repo.go +++ b/models/repo.go @@ -419,8 +419,8 @@ func (repo *Repository) ComposeCompareURL(oldCommitID, newCommitID string) strin return fmt.Sprintf("%s/%s/compare/%s...%s", repo.MustOwner().Name, repo.Name, oldCommitID, newCommitID) } -func (repo *Repository) HasAccess(u *User) bool { - has, _ := HasAccess(u, repo, ACCESS_MODE_READ) +func (repo *Repository) HasAccess(userID int64) bool { + has, _ := HasAccess(userID, repo, ACCESS_MODE_READ) return has } |