From f388661bda8097b5ff01548e6153c566690c9b5e Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 7 Nov 2016 17:20:37 +0100 Subject: ACCESS_MODE_* -> AccessMode* --- models/repo_collaboration.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'models/repo_collaboration.go') 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 } -- cgit v1.2.3