diff options
Diffstat (limited to 'internal/admin/service.go')
| -rw-r--r-- | internal/admin/service.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/admin/service.go b/internal/admin/service.go index c1082d5..4f955da 100644 --- a/internal/admin/service.go +++ b/internal/admin/service.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "log/slog" + "strconv" casbin "github.com/casbin/casbin/v2" ) @@ -43,6 +44,7 @@ func (s *Servicer) Reload() { func (s *Servicer) InitServer() error { policies := s.Conf.ServerPolicies() numAdded := 0 + slog.Debug(fmt.Sprintf("number of repos %s", strconv.Itoa(len(s.Conf.Repos)))) for _, policy := range policies { added, err := s.AddPolicy(policy[0], policy[1], policy[2]) if err != nil { @@ -76,6 +78,7 @@ func NewService(modelPath, policyPath, serverConfigPath, reposDir string, mgmtRe if err != nil { return &Servicer{}, err } + slog.Debug(fmt.Sprintf("policy path %s", workingPolicyPath)) enf, err := casbin.NewSyncedEnforcer(modelPath, workingPolicyPath) if err != nil { return &Servicer{}, fmt.Errorf("Couldn't load the enforcer encountered the following error: %w", err) |