From e877152062165a6855d97bbde868572b07a03be4 Mon Sep 17 00:00:00 2001 From: "Aeneas Rekkas (arekkas)" Date: Sun, 23 Oct 2016 18:34:15 +0200 Subject: [PATCH] manager: fix sql default value --- ladon.go | 2 +- manager_sql.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ladon.go b/ladon.go index 5c6fd75..0b6e21f 100644 --- a/ladon.go +++ b/ladon.go @@ -16,7 +16,7 @@ type Ladon struct { func (g *Ladon) IsAllowed(r *Request) (err error) { policies, err := g.Manager.FindPoliciesForSubject(r.Subject) if err != nil { - return errors.Wrap(err, "") + return err } return g.doPoliciesAllow(r, policies) diff --git a/manager_sql.go b/manager_sql.go index 1d50327..f074045 100644 --- a/manager_sql.go +++ b/manager_sql.go @@ -65,7 +65,7 @@ func (s *SQLManager) CreateSchemas() error { // Create inserts a new policy func (s *SQLManager) Create(policy Policy) (err error) { - conditions := []byte("[]") + conditions := []byte("{}") if policy.GetConditions() != nil { cs := policy.GetConditions() conditions, err = json.Marshal(&cs)