summaryrefslogtreecommitdiffstats
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-05 20:45:23 -0500
committerUnknwon <u@gogs.io>2016-03-05 20:45:23 -0500
commita5b0400be7c8868b685403e0718bdd66149c3e84 (patch)
tree6db3f4999fa43e0b8a384ca4da8885aa00a4de8f /modules/middleware/context.go
parent045f14fbd0e3553521f5092cf839be363c74a090 (diff)
downloadgitea-a5b0400be7c8868b685403e0718bdd66149c3e84.tar.gz
gitea-a5b0400be7c8868b685403e0718bdd66149c3e84.zip
#1146 finish new access rights for collaborators
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r--modules/middleware/context.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index cd11c08b15..cee5d10032 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -84,12 +84,12 @@ func (r *RepoContext) IsAdmin() bool {
return r.AccessMode >= models.ACCESS_MODE_ADMIN
}
-// IsPusher returns true if current user has write or higher access of repository.
-func (r *RepoContext) IsPusher() bool {
+// IsWriter returns true if current user has write or higher access of repository.
+func (r *RepoContext) IsWriter() bool {
return r.AccessMode >= models.ACCESS_MODE_WRITE
}
-// Return if the current user has read access for this repository
+// HasAccess returns true if the current user has at least read access for this repository
func (r *RepoContext) HasAccess() bool {
return r.AccessMode >= models.ACCESS_MODE_READ
}