hscontrol: allow CreatePreAuthKey without user when tags provided

Handle case where user is 0 in gRPC layer to support tags-only
auth keys.
This commit is contained in:
Kristoffer Dalby
2026-01-07 15:31:28 +01:00
committed by Kristoffer Dalby
parent 4dd1b49a35
commit c8c3c9d4a0
2 changed files with 9 additions and 5 deletions

View File

@@ -160,7 +160,7 @@ func (hsdb *HSDatabase) ListPreAuthKeys() ([]types.PreAuthKey, error) {
})
}
// ListPreAuthKeys returns the list of PreAuthKeys for a user.
// ListPreAuthKeys returns all PreAuthKeys in the database.
func ListPreAuthKeys(tx *gorm.DB) ([]types.PreAuthKey, error) {
var keys []types.PreAuthKey