Remove ActionFileDownloadUrl, replace with ActionFileGet

The two actions expressed the same permission. Consolidate on
core:file:get and remove the now-redundant core:file:download-url
constant, policy entries, and all three call sites.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-08 19:54:18 +02:00
parent 6f83d9be48
commit d94864fe2d
3 changed files with 5 additions and 6 deletions

View File

@@ -296,7 +296,6 @@ const (
// File actions // File actions
ActionFileGet = "core:file:get" ActionFileGet = "core:file:get"
ActionFileDownloadUrl = "core:file:download-url"
// Connector actions // Connector actions
ActionConnectorInitiate = "core:connector:initiate" ActionConnectorInitiate = "core:connector:initiate"

View File

@@ -76,7 +76,7 @@ var ViewerPolicy = policy.NewPolicy(
ActionProcessingActivityGet, ActionProcessingActivityList, ActionProcessingActivityGet, ActionProcessingActivityList,
ActionDataProtectionImpactAssessmentGet, ActionDataProtectionImpactAssessmentList, ActionDataProtectionImpactAssessmentGet, ActionDataProtectionImpactAssessmentList,
ActionTransferImpactAssessmentGet, ActionTransferImpactAssessmentList, ActionTransferImpactAssessmentGet, ActionTransferImpactAssessmentList,
ActionFileGet, ActionFileDownloadUrl, ActionFileGet,
ActionSlackConnectionList, ActionConnectorList, ActionSlackConnectionList, ActionConnectorList,
ActionRightsRequestGet, ActionRightsRequestList, ActionRightsRequestGet, ActionRightsRequestList,
ActionStatementOfApplicabilityGet, ActionStatementOfApplicabilityList, ActionStatementOfApplicabilityGet, ActionStatementOfApplicabilityList,
@@ -164,7 +164,7 @@ var AuditorPolicy = policy.NewPolicy(
ActionProcessingActivityGet, ActionProcessingActivityList, ActionProcessingActivityGet, ActionProcessingActivityList,
ActionDataProtectionImpactAssessmentGet, ActionDataProtectionImpactAssessmentList, ActionDataProtectionImpactAssessmentGet, ActionDataProtectionImpactAssessmentList,
ActionTransferImpactAssessmentGet, ActionTransferImpactAssessmentList, ActionTransferImpactAssessmentGet, ActionTransferImpactAssessmentList,
ActionFileGet, ActionFileDownloadUrl, ActionFileGet,
ActionStatementOfApplicabilityGet, ActionStatementOfApplicabilityList, ActionStatementOfApplicabilityGet, ActionStatementOfApplicabilityList,
ActionApplicabilityStatementGet, ActionApplicabilityStatementList, ActionApplicabilityStatementGet, ActionApplicabilityStatementList,
ActionRiskAssessmentGet, ActionRiskAssessmentList, ActionRiskAssessmentGet, ActionRiskAssessmentList,

View File

@@ -984,7 +984,7 @@ func (r *thirdPartyBusinessAssociateAgreementResolver) ThirdParty(ctx context.Co
// FileURL is the resolver for the fileUrl field. // FileURL is the resolver for the fileUrl field.
func (r *thirdPartyBusinessAssociateAgreementResolver) FileURL(ctx context.Context, obj *types.ThirdPartyBusinessAssociateAgreement) (string, error) { func (r *thirdPartyBusinessAssociateAgreementResolver) FileURL(ctx context.Context, obj *types.ThirdPartyBusinessAssociateAgreement) (string, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionFileDownloadUrl) scope, err := r.authorize(ctx, obj.ID, probo.ActionFileGet)
if err != nil { if err != nil {
return "", err return "", err
} }
@@ -1175,7 +1175,7 @@ func (r *thirdPartyDataPrivacyAgreementResolver) ThirdParty(ctx context.Context,
// FileURL is the resolver for the fileUrl field. // FileURL is the resolver for the fileUrl field.
func (r *thirdPartyDataPrivacyAgreementResolver) FileURL(ctx context.Context, obj *types.ThirdPartyDataPrivacyAgreement) (string, error) { func (r *thirdPartyDataPrivacyAgreementResolver) FileURL(ctx context.Context, obj *types.ThirdPartyDataPrivacyAgreement) (string, error) {
scope, err := r.authorize(ctx, obj.ID, probo.ActionFileDownloadUrl) scope, err := r.authorize(ctx, obj.ID, probo.ActionFileGet)
if err != nil { if err != nil {
return "", err return "", err
} }