Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -101,8 +101,10 @@ func (a *Authorizer) authorize(ctx context.Context, tx pg.Tx, params AuthorizePa
*params.Session,
membership.ID,
); err != nil {
var errSessionNotFound *ErrSessionNotFound
var errSessionExpired *ErrSessionExpired
var (
errSessionNotFound *ErrSessionNotFound
errSessionExpired *ErrSessionExpired
)
if errors.As(err, &errSessionNotFound) || errors.As(err, &errSessionExpired) {
return NewAssumptionRequiredError(params.Principal, membership.ID)
@@ -222,6 +224,7 @@ func (a *Authorizer) buildPrincipalAttributes(
if err != nil {
return nil, fmt.Errorf("cannot load principal attributes: %w", err)
}
maps.Copy(attrs, entityAttrs)
}
}
@@ -252,6 +255,7 @@ func (a *Authorizer) buildResourceAttributes(
if err != nil {
return nil, fmt.Errorf("cannot load resource attributes: %w", err)
}
maps.Copy(attrs, entityAttrs)
if params.ResourceAttributes != nil {
@@ -312,6 +316,7 @@ func (a *Authorizer) recordAuditLog(
"cannot parse organization id for audit log",
log.Error(err),
)
return
}
@@ -331,6 +336,7 @@ func (a *Authorizer) recordAuditLog(
"cannot marshal audit log metadata",
log.Error(err),
)
return
}