diff options
author | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 01:08:22 +0800 |
commit | 1f2e173a745da8e4b57f96b5561a3c10054d3b76 (patch) | |
tree | 367f0f07e4fe1269ac0772e0561a4bf912b5153c /models/ssh_key.go | |
parent | 46e96c008cf966428c9dad71c7871de88186e3fe (diff) | |
download | gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.tar.gz gitea-1f2e173a745da8e4b57f96b5561a3c10054d3b76.zip |
Refactor User.Id to User.ID
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r-- | models/ssh_key.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go index a279b48711..92f38b570a 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -562,8 +562,8 @@ func DeletePublicKey(doer *User, id int64) (err error) { } // Check if user has access to delete this key. - if !doer.IsAdmin && doer.Id != key.OwnerID { - return ErrKeyAccessDenied{doer.Id, key.ID, "public"} + if !doer.IsAdmin && doer.ID != key.OwnerID { + return ErrKeyAccessDenied{doer.ID, key.ID, "public"} } sess := x.NewSession() @@ -797,7 +797,7 @@ func DeleteDeployKey(doer *User, id int64) error { if err != nil { return fmt.Errorf("HasAccess: %v", err) } else if !yes { - return ErrKeyAccessDenied{doer.Id, key.ID, "deploy"} + return ErrKeyAccessDenied{doer.ID, key.ID, "deploy"} } } |