try something else
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 16:17:36 +11:00
parent a8b645288b
commit 3c8d18afc4

View File

@@ -72,7 +72,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
// Query for group access
queryArgs := []interface{}{}
query := `SELECT users.UserId, users.GroupId, permissions.ReadOnly, safes.SafeName, secrets.*
query := `SELECT *
FROM users
INNER JOIN groups ON users.GroupId = groups.GroupId
INNER JOIN permissions ON groups.GroupId = permissions.GroupId
@@ -126,7 +126,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
*/
// Execute the query
log.Printf("SecretsGetAllowedForGroup query string : '%s'\n%+v\n", query, queryArgs)
log.Printf("SecretsGetAllowedForGroup query string : '%s'\nArguments: %+v\n", query, queryArgs)
rows, err := db.Queryx(query, queryArgs...)
if err != nil {