From e40111a276ecbbdacee164496c65cae9a966abc4 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 15 Jan 2024 23:15:57 -0500 Subject: [PATCH] fix: sec was not used --- api/casbin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/casbin.go b/api/casbin.go index 88af6d2..5f387aa 100644 --- a/api/casbin.go +++ b/api/casbin.go @@ -75,8 +75,8 @@ func (a *PolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error a.lock.Lock() defer a.lock.Unlock() - // Create a line representing the policy rule - line := ptype + ", " + strings.Join(rule, ", ") + // Create a line representing the policy rule with the section + line := sec + ", " + ptype + ", " + strings.Join(rule, ", ") // Check if the policy rule already exists for _, existingLine := range a.policy {