test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 21:38:33 +11:00
parent 203a564b04
commit 5a87ecebfc
2 changed files with 4 additions and 2 deletions

View File

@@ -83,6 +83,8 @@ func ReceiveKey(key string) error {
}
if !compare {
return errors.New("secret key is not correct")
} else {
log.Printf("ReceiveKey successfully verified supplied key\n")
}
} else if filePath != "" {
log.Printf("ReceiveKey storing key into file '%s'\n", filePath)

View File

@@ -72,7 +72,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
// Query for group access
queryArgs := []interface{}{}
query := `
SELECT users.UserId, permissions.ReadOnly,
SELECT users.UserId, permissions.*,
secrets.SecretId, secrets.SafeId, secrets.DeviceName, secrets.DeviceCategory, secrets.UserName
FROM users
INNER JOIN groups ON users.GroupId = groups.GroupId
@@ -100,7 +100,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
// Query for user access
query += `
UNION
SELECT users.UserId, permissions.ReadOnly,
SELECT users.UserId, permissions.*,
secrets.SecretId, secrets.SafeId, secrets.DeviceName, secrets.DeviceCategory, secrets.UserName
FROM users
INNER JOIN permissions ON users.UserId = permissions.UserId