diff options
author | 无闻 <u@gogs.io> | 2015-02-28 21:57:58 -0500 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2015-02-28 21:57:58 -0500 |
commit | 8d17ff8ce7a563be7abd54573cb91894a2bfdab6 (patch) | |
tree | 4ae149d136d40b06818b691bbfacf88d1ac77adf /models | |
parent | f44204e9449c09e0fef37a4974dc2f2043593d6f (diff) | |
parent | 556881964fb8137561e9f381d4a5aaef97627cc5 (diff) | |
download | gitea-8d17ff8ce7a563be7abd54573cb91894a2bfdab6.tar.gz gitea-8d17ff8ce7a563be7abd54573cb91894a2bfdab6.zip |
Merge pull request #964 from phsmit/access_rewriteserv
Rewrite/simplify gogs serve
Diffstat (limited to 'models')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/user.go b/models/user.go index ea5041bdff..f5bec2e83a 100644 --- a/models/user.go +++ b/models/user.go @@ -40,7 +40,7 @@ var ( ErrUserHasOrgs = errors.New("User still have membership of organization") ErrUserAlreadyExist = errors.New("User already exist") ErrUserNotExist = errors.New("User does not exist") - ErrUserNotKeyOwner = errors.New("User does not the owner of public key") + ErrPublicKeyNotExist = errors.New("Public key does not exist") ErrEmailAlreadyUsed = errors.New("E-mail already used") ErrEmailNotExist = errors.New("E-mail does not exist") ErrEmailNotActivated = errors.New("E-mail address has not been activated") @@ -518,7 +518,7 @@ func GetUserByKeyId(keyId int64) (*User, error) { if err != nil { return nil, err } else if !has { - return nil, ErrUserNotKeyOwner + return nil, ErrPublicKeyNotExist } return user, nil } |