Merge branch 'worktree-agent-a82ec64b6cc1a2809'
# Conflicts: # internal/app/archie/operations.go # modules/events/events.go # modules/governance/accounts_api.go # modules/governance/governance.go
This commit is contained in:
44 files changed
+1462
-266
No files matched your search
@@ -99,7 +99,8 @@ func (s Settings) path(eligible map[string]string, owner string) []PathStep {
|
||||
// Holds reports whether the account is allowed every one of actions on r by
|
||||
// the live access policies. It is false while no policy chain is attached.
|
||||
func (m *Module) Holds(ctx context.Context, account IdentityID, r Resource, actions ...Action) (bool, error) {
|
||||
if m.authorizer == nil {
|
||||
authz := m.authz()
|
||||
if authz == nil {
|
||||
return false, nil
|
||||
}
|
||||
p, err := m.PrincipalFor(ctx, account)
|
||||
@@ -107,7 +108,7 @@ func (m *Module) Holds(ctx context.Context, account IdentityID, r Resource, acti
|
||||
return false, err
|
||||
}
|
||||
for _, a := range actions {
|
||||
d := m.authorizer.Authorize(ctx, p, a, r, AccessContext{})
|
||||
d := authz.Authorize(ctx, p, a, r, AccessContext{})
|
||||
if d.Err != nil {
|
||||
return false, d.Err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user