diff options
Diffstat (limited to 'models/asymkey/ssh_key_principals.go')
-rw-r--r-- | models/asymkey/ssh_key_principals.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/asymkey/ssh_key_principals.go b/models/asymkey/ssh_key_principals.go index 19fc6644cb..5f18fd04d1 100644 --- a/models/asymkey/ssh_key_principals.go +++ b/models/asymkey/ssh_key_principals.go @@ -25,7 +25,7 @@ import ( // This file contains functions related to principals // AddPrincipalKey adds new principal to database and authorized_principals file. -func AddPrincipalKey(ownerID int64, content string, loginSourceID int64) (*PublicKey, error) { +func AddPrincipalKey(ownerID int64, content string, authSourceID int64) (*PublicKey, error) { ctx, committer, err := db.TxContext() if err != nil { return nil, err @@ -49,7 +49,7 @@ func AddPrincipalKey(ownerID int64, content string, loginSourceID int64) (*Publi Content: content, Mode: perm.AccessModeWrite, Type: KeyTypePrincipal, - LoginSourceID: loginSourceID, + LoginSourceID: authSourceID, } if err = addPrincipalKey(sess, key); err != nil { return nil, fmt.Errorf("addKey: %v", err) |