Skip to content

Commit

Permalink
feat: add permission manager (#1507)
Browse files Browse the repository at this point in the history
* feat: introduce permission manager

Moved group methods to group package
Moved createTestControllerEnvironment function to jimmtest package

* chore: add juju auth factory

* chore: fixed access tests

* chore: fix relations tests

* chore: refactor grant/revoke offer tests

* chore: change exported surface of jujuauth pkg

* chore: fixes after rebase

* chore: fix list offers test

Listing offers test was failing because model owner was only expected to have consume access on offers but should have admin access.

* chore: add missing docstrings

* chore: add check for missing jimm tag

* chore: update copyright headers

Also updated constructor from NewPermissionManager to NewManager

* chore: minor renaming

---------

Co-authored-by: Ales Stimec <ales.stimec@canonical.com>
  • Loading branch information
kian99 and alesstimec authored Jan 9, 2025
1 parent 4ee7344 commit 212fb31
Show file tree
Hide file tree
Showing 47 changed files with 3,836 additions and 3,610 deletions.
2 changes: 1 addition & 1 deletion cmd/jimmsrv/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (s *Service) OpenFGACleanup(ctx context.Context, trigger <-chan time.Time)
for {
select {
case <-trigger:
err := s.jimm.OpenFGACleanup(ctx)
err := s.jimm.PermissionManager().OpenFGACleanup(ctx)
if err != nil {
zapctx.Error(ctx, "openfga cleanup", zap.Error(err))
continue
Expand Down
Loading

0 comments on commit 212fb31

Please sign in to comment.