diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index ffa2f6440f..dcb2311cf6 100644 --- a/models/user.go +++ b/models/user.go @@ -375,7 +375,7 @@ func (u *User) DeleteAvatar() error { // IsAdminOfRepo returns true if user has admin or higher access of repository. func (u *User) IsAdminOfRepo(repo *Repository) bool { - has, err := HasAccess(u, repo, ACCESS_MODE_ADMIN) + has, err := HasAccess(u, repo, AccessModeAdmin) if err != nil { log.Error(3, "HasAccess: %v", err) } @@ -384,7 +384,7 @@ func (u *User) IsAdminOfRepo(repo *Repository) bool { // IsWriterOfRepo returns true if user has write access to given repository. func (u *User) IsWriterOfRepo(repo *Repository) bool { - has, err := HasAccess(u, repo, ACCESS_MODE_WRITE) + has, err := HasAccess(u, repo, AccessModeWrite) if err != nil { log.Error(3, "HasAccess: %v", err) } @@ -886,7 +886,7 @@ func GetUserByID(id int64) (*User, error) { // GetAssigneeByID returns the user with write access of repository by given ID. func GetAssigneeByID(repo *Repository, userID int64) (*User, error) { - has, err := HasAccess(&User{ID: userID}, repo, ACCESS_MODE_WRITE) + has, err := HasAccess(&User{ID: userID}, repo, AccessModeWrite) if err != nil { return nil, err } else if !has { |