diff options
author | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:20:37 +0100 |
---|---|---|
committer | Sandro Santilli <strk@kbt.io> | 2016-11-07 17:20:37 +0100 |
commit | f388661bda8097b5ff01548e6153c566690c9b5e (patch) | |
tree | d0bdf0785474f50eb42b6b4852922201620221cf /models/repo_collaboration.go | |
parent | 0b62aeb495c9c1daf816a754a0e4abbf8c62c2c0 (diff) | |
download | gitea-f388661bda8097b5ff01548e6153c566690c9b5e.tar.gz gitea-f388661bda8097b5ff01548e6153c566690c9b5e.zip |
ACCESS_MODE_* -> AccessMode*
Diffstat (limited to 'models/repo_collaboration.go')
-rw-r--r-- | models/repo_collaboration.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go index f4b23f9ebe..214aa2a015 100644 --- a/models/repo_collaboration.go +++ b/models/repo_collaboration.go @@ -18,11 +18,11 @@ type Collaboration struct { func (c *Collaboration) ModeI18nKey() string { switch c.Mode { - case ACCESS_MODE_READ: + case AccessModeRead: return "repo.settings.collaboration.read" - case ACCESS_MODE_WRITE: + case AccessModeWrite: return "repo.settings.collaboration.write" - case ACCESS_MODE_ADMIN: + case AccessModeAdmin: return "repo.settings.collaboration.admin" default: return "repo.settings.collaboration.undefined" @@ -42,7 +42,7 @@ func (repo *Repository) AddCollaborator(u *User) error { } else if has { return nil } - collaboration.Mode = ACCESS_MODE_WRITE + collaboration.Mode = AccessModeWrite sess := x.NewSession() defer sessionRelease(sess) @@ -105,7 +105,7 @@ func (repo *Repository) GetCollaborators() ([]*Collaborator, error) { // ChangeCollaborationAccessMode sets new access mode for the collaboration. func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode) error { // Discard invalid input - if mode <= ACCESS_MODE_NONE || mode > ACCESS_MODE_OWNER { + if mode <= AccessModeNone || mode > AccessModeOwner { return nil } |