Skip to content

Commit

Permalink
solve failing complitation
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Dec 17, 2024
1 parent 83e4d9c commit fc102a2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions clients/middleware/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (am *authorizationMiddleware) CreateClients(ctx context.Context, session au
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.CreateOp,
EntityIDs: auth.AnyIDs{}.Values(),
}); err != nil {
Expand Down Expand Up @@ -108,7 +108,7 @@ func (am *authorizationMiddleware) View(ctx context.Context, session authn.Sessi
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.ReadOp,
EntityIDs: []string{id},
}); err != nil {
Expand All @@ -135,7 +135,7 @@ func (am *authorizationMiddleware) ListClients(ctx context.Context, session auth
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.ListOp,
EntityIDs: auth.AnyIDs{}.Values(),
}); err != nil {
Expand All @@ -157,7 +157,7 @@ func (am *authorizationMiddleware) Update(ctx context.Context, session authn.Ses
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.UpdateOp,
EntityIDs: []string{client.ID},
}); err != nil {
Expand Down Expand Up @@ -185,7 +185,7 @@ func (am *authorizationMiddleware) UpdateTags(ctx context.Context, session authn
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.UpdateOp,
EntityIDs: []string{client.ID},
}); err != nil {
Expand Down Expand Up @@ -213,7 +213,7 @@ func (am *authorizationMiddleware) UpdateSecret(ctx context.Context, session aut
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.UpdateOp,
EntityIDs: []string{id},
}); err != nil {
Expand All @@ -240,7 +240,7 @@ func (am *authorizationMiddleware) Enable(ctx context.Context, session authn.Ses
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.UpdateOp,
EntityIDs: []string{id},
}); err != nil {
Expand Down Expand Up @@ -268,7 +268,7 @@ func (am *authorizationMiddleware) Disable(ctx context.Context, session authn.Se
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.UpdateOp,
EntityIDs: []string{id},
}); err != nil {
Expand All @@ -295,7 +295,7 @@ func (am *authorizationMiddleware) Delete(ctx context.Context, session authn.Ses
PatID: session.ID,
PlatformEntityType: auth.PlatformDomainsScope,
OptionalDomainID: session.DomainID,
OptionalDomainEntityType: auth.DomainThingsScope,
OptionalDomainEntityType: auth.DomainClientsScope,
Operation: auth.DeleteOp,
EntityIDs: []string{id},
}); err != nil {
Expand Down

0 comments on commit fc102a2

Please sign in to comment.