fix audit table definition
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -15,6 +15,8 @@ import (
|
||||
"github.com/jmoiron/sqlx"
|
||||
)
|
||||
|
||||
const nonceSize = 12
|
||||
|
||||
// We use the json:"-" field tag to prevent showing these details to the user
|
||||
type Secret struct {
|
||||
SecretId int `db:"SecretId"`
|
||||
@@ -34,8 +36,6 @@ type UserSecret struct {
|
||||
Permission
|
||||
}
|
||||
|
||||
const nonceSize = 12
|
||||
|
||||
func (s *Secret) SaveSecret() (*Secret, error) {
|
||||
|
||||
var err error
|
||||
@@ -56,20 +56,9 @@ func (s *Secret) SaveSecret() (*Secret, error) {
|
||||
}
|
||||
|
||||
func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
||||
// Query based on group
|
||||
// SELECT users.UserId, users.GroupId, permissions.ReadOnly, permissions.SafeId, safes.SafeName, secrets.* FROM users INNER JOIN groups ON users.GroupId = groups.GroupId INNER JOIN permissions ON groups.GroupId = permissions.GroupId INNER JOIN safes on permissions.SafeId = safes.SafeId INNER JOIN secrets on secrets.SafeId = safes.SafeId WHERE users.UserId = 2
|
||||
var err error
|
||||
var secretResults []UserSecret
|
||||
|
||||
/*
|
||||
// Make sure at least one parameter was specified
|
||||
if s.DeviceName == "" && s.DeviceCategory == "" && s.UserName == "" {
|
||||
err = errors.New("no search parameters specified")
|
||||
log.Println(err)
|
||||
return secretResults, err
|
||||
}
|
||||
*/
|
||||
|
||||
// Query for group access
|
||||
queryArgs := []interface{}{}
|
||||
query := `
|
||||
|
Reference in New Issue
Block a user