Fix lint issues in connect v1 resolvers

Drop the redundant embedded Resolver selector flagged by staticcheck
(QF1008) in the membership and organization permission resolvers, and
add the whitespace wsl_v5 expects around the attribute range loop and
the final return in permission.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
Sacha Al Himdani
2026-07-08 22:02:31 +02:00
parent 86c45875a4
commit 83e7b3bdd4
3 changed files with 4 additions and 2 deletions

View File

@@ -134,6 +134,7 @@ func (r *Resolver) Permission(ctx context.Context, obj types.Node, action string
func (r *Resolver) permission(ctx context.Context, obj types.Node, action string, attributes map[string]any) (bool, error) {
opts := []authz.AuthorizeFuncOption{authz.WithDryRun()}
for key, value := range attributes {
if s, ok := value.(string); ok {
opts = append(opts, authz.WithAttr(key, s))
@@ -141,6 +142,7 @@ func (r *Resolver) permission(ctx context.Context, obj types.Node, action string
}
_, err := r.authorize(ctx, obj.GetID(), action, opts...)
return err == nil, nil
}