@@ -89,10 +89,11 @@ func (e *AccessEntry) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,10 +108,11 @@ func (h *AccessEntryDecisionHistory) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (c *AccessReviewCampaign) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (as *AccessSource) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,10 +141,11 @@ func (e *AgentRun) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,11 @@ func (s *ApplicabilityStatement) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,10 +75,11 @@ func (a *Asset) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,10 +81,11 @@ func (a *Audit) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (e *AuditLogEntry) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (c *ComplianceExternalURL) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,11 @@ func (c *ComplianceFramework) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,10 +105,11 @@ func (c *Connector) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,10 +78,11 @@ func (c *Control) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,11 @@ func (b *CookieBanner) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,11 @@ func (t *CookieBannerTranslation) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,10 +100,11 @@ func (v *CookieBannerVersion) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,10 +102,11 @@ func (c *CookieCategory) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,10 +78,11 @@ func (r *CookieConsentRecord) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,10 +88,11 @@ func (cd *CustomDomain) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,10 +183,11 @@ func (dpia *DataProtectionImpactAssessment) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,10 +75,11 @@ func (d *Datum) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,10 +85,11 @@ func (d *Document) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (dv *DocumentVersion) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ func (d *DocumentVersionApprovalDecision) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,10 +70,11 @@ func (q *DocumentVersionApprovalQuorum) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,10 +84,11 @@ func (dvs *DocumentVersionSignature) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ func (es *ElectronicSignature) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
if err := rows.Scan(&id, &organizationID); err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
|
|||||||
@@ -91,10 +91,11 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id gid.GID
|
var id gid.GID
|
||||||
err = rows.Scan(&id)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan email authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan email authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,10 +79,11 @@ func (e *Evidence) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,10 +83,11 @@ func (ej *ExportJob) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,10 +85,11 @@ func (f *File) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,10 +92,11 @@ func (f *Finding) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
frameworkID gid.GID
|
frameworkID gid.GID
|
||||||
@@ -88,10 +89,12 @@ WHERE
|
|||||||
if err := rows.Scan(&frameworkID, &organizationID); err != nil {
|
if err := rows.Scan(&frameworkID, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan framework authorization attributes batch: %w", err)
|
return nil, fmt.Errorf("cannot scan framework authorization attributes batch: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
attrsByID[frameworkID] = policy.Attributes{
|
attrsByID[frameworkID] = policy.Attributes{
|
||||||
"organization_id": organizationID.String(),
|
"organization_id": organizationID.String(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := rows.Err(); err != nil {
|
if err := rows.Err(); err != nil {
|
||||||
return nil, fmt.Errorf("cannot iterate framework authorization attributes batch: %w", err)
|
return nil, fmt.Errorf("cannot iterate framework authorization attributes batch: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ func (ml *MailingList) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,10 +64,11 @@ func (cns *MailingListSubscriber) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (mlu *MailingListUpdate) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,11 @@ func (m *Measure) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -228,6 +228,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
@@ -114,6 +115,7 @@ WHERE
|
|||||||
if organizationID != nil {
|
if organizationID != nil {
|
||||||
attrs["organization_id"] = organizationID.String()
|
attrs["organization_id"] = organizationID.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
attrsByID[id] = attrs
|
attrsByID[id] = attrs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -83,10 +83,11 @@ func (o *Obligation) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ func (o *Organization) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id gid.GID
|
var id gid.GID
|
||||||
if err := rows.Scan(&id); err != nil {
|
if err := rows.Scan(&id); err != nil {
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -196,10 +196,11 @@ func (p *ProcessingActivity) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,11 @@ func (r *Report) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,10 +81,11 @@ func (rr *RightsRequest) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,10 +202,11 @@ func (r *Risk) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,10 +71,11 @@ func (ra *RiskAssessment) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (n *RiskAssessmentNode) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ func (p *RiskAssessmentProcess) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (s *RiskAssessmentScenario) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,10 +71,11 @@ func (s *RiskAssessmentScope) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ func (t *RiskAssessmentThreat) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,10 +83,11 @@ func (s *SAMLConfiguration) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,10 +80,11 @@ func (s *SCIMBridge) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,10 +70,11 @@ func (s *SCIMConfiguration) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,11 @@ func (s *SCIMEvent) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ WHERE
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
attrsByID := make(policy.AttributesByID, len(resourceIDs))
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var (
|
var (
|
||||||
id gid.GID
|
id gid.GID
|
||||||
|
|||||||
@@ -77,10 +77,11 @@ func (sm *SlackMessage) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (s *StatementOfApplicability) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,10 +83,11 @@ func (t *Task) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,10 +201,11 @@ func (v *ThirdParty) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (vbaa *ThirdPartyBusinessAssociateAgreement) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (v *ThirdPartyComplianceReport) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,10 +77,11 @@ func (vc *ThirdPartyContact) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (vdpa *ThirdPartyDataPrivacyAgreement) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ func (v *ThirdPartyRiskAssessment) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (vs *ThirdPartyService) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,10 +99,11 @@ func (tp *TrackerPattern) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,10 +87,11 @@ func (tr *TrackerResource) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,10 +182,11 @@ func (tia *TransferImpactAssessment) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,11 @@ func (tc *TrustCenter) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,10 +72,11 @@ func (tca *TrustCenterAccess) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,11 @@ func (tcda *TrustCenterDocumentAccess) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,10 +74,11 @@ func (t *TrustCenterFile) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,10 +80,11 @@ func (t *TrustCenterReference) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,10 +104,11 @@ func (w *WebhookSubscription) AuthorizationAttributes(
|
|||||||
defer rows.Close()
|
defer rows.Close()
|
||||||
|
|
||||||
attrsByID := make(policy.AttributesByID)
|
attrsByID := make(policy.AttributesByID)
|
||||||
|
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var id, organizationID gid.GID
|
var id, organizationID gid.GID
|
||||||
err := rows.Scan(&id, &organizationID)
|
|
||||||
if err != nil {
|
if err := rows.Scan(&id, &organizationID); err != nil {
|
||||||
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
return nil, fmt.Errorf("cannot scan authorization attributes: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ func (a *Authorizer) evaluateMultiInTx(
|
|||||||
// On failure, ErrAssumptionRequired is recorded only against items that
|
// On failure, ErrAssumptionRequired is recorded only against items that
|
||||||
// did not opt out.
|
// did not opt out.
|
||||||
var assumptionErr error
|
var assumptionErr error
|
||||||
|
|
||||||
if requiresAssumptionCheck {
|
if requiresAssumptionCheck {
|
||||||
err := a.checkAssumption(
|
err := a.checkAssumption(
|
||||||
ctx,
|
ctx,
|
||||||
@@ -431,6 +432,7 @@ func (a *Authorizer) evaluateMultiInTx(
|
|||||||
|
|
||||||
decisions := make([]error, len(params.Items))
|
decisions := make([]error, len(params.Items))
|
||||||
itemAttrs := make([]policy.Attributes, len(params.Items))
|
itemAttrs := make([]policy.Attributes, len(params.Items))
|
||||||
|
|
||||||
for i, item := range params.Items {
|
for i, item := range params.Items {
|
||||||
resAttrs := resourceAttrsByResourceID[item.Resource]
|
resAttrs := resourceAttrsByResourceID[item.Resource]
|
||||||
if len(item.ResourceAttributes) > 0 {
|
if len(item.ResourceAttributes) > 0 {
|
||||||
@@ -438,6 +440,7 @@ func (a *Authorizer) evaluateMultiInTx(
|
|||||||
maps.Copy(merged, item.ResourceAttributes)
|
maps.Copy(merged, item.ResourceAttributes)
|
||||||
resAttrs = merged
|
resAttrs = merged
|
||||||
}
|
}
|
||||||
|
|
||||||
itemAttrs[i] = resAttrs
|
itemAttrs[i] = resAttrs
|
||||||
|
|
||||||
if assumptionErr != nil && !item.SkipAssumptionCheck {
|
if assumptionErr != nil && !item.SkipAssumptionCheck {
|
||||||
|
|||||||
@@ -986,6 +986,7 @@ func insertBatchTestChildSession(
|
|||||||
expiredAt := now.Add(30 * time.Minute)
|
expiredAt := now.Add(30 * time.Minute)
|
||||||
|
|
||||||
var expireReason *coredata.ExpireReason
|
var expireReason *coredata.ExpireReason
|
||||||
|
|
||||||
if expired {
|
if expired {
|
||||||
reason := coredata.ExpireReasonRevoked
|
reason := coredata.ExpireReasonRevoked
|
||||||
expireReason = &reason
|
expireReason = &reason
|
||||||
@@ -1039,6 +1040,7 @@ func countAuditLogsForAction(t *testing.T, ctx context.Context, client *pg.Clien
|
|||||||
t.Helper()
|
t.Helper()
|
||||||
|
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {
|
require.NoError(t, client.WithTx(ctx, func(ctx context.Context, tx pg.Tx) error {
|
||||||
if err := tx.QueryRow(
|
if err := tx.QueryRow(
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ func TestAuthorizer_ValidateInputs(t *testing.T) {
|
|||||||
_, ok := errors.AsType[*ErrEmptyResourceBatch](err)
|
_, ok := errors.AsType[*ErrEmptyResourceBatch](err)
|
||||||
require.True(t, ok)
|
require.True(t, ok)
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAuthorizer_InternalErrorPaths(t *testing.T) {
|
func TestAuthorizer_InternalErrorPaths(t *testing.T) {
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ func TestAuthorizeRelatedErrors_Error(t *testing.T) {
|
|||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
if tt.err.Error() != tt.want {
|
if tt.err.Error() != tt.want {
|
||||||
t.Errorf("Error() = %q, want %q", tt.err.Error(), tt.want)
|
t.Errorf("Error() = %q, want %q", tt.err.Error(), tt.want)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user