deletePublicKeys does the actual key deletion but does not update authorized_keys file.
(e *xorm.Session, keyIDs ...int64)
| 471 | |
| 472 | // deletePublicKeys does the actual key deletion but does not update authorized_keys file. |
| 473 | func deletePublicKeys(e *xorm.Session, keyIDs ...int64) error { |
| 474 | if len(keyIDs) == 0 { |
| 475 | return nil |
| 476 | } |
| 477 | |
| 478 | _, err := e.In("id", keyIDs).Delete(new(PublicKey)) |
| 479 | return err |
| 480 | } |
| 481 | |
| 482 | // DeletePublicKey deletes SSH key information both in database and authorized_keys file. |
| 483 | func DeletePublicKey(doer *User, id int64) (err error) { |
no test coverage detected