Make cookie banner origin immutable after creation
Origin is a fundamental identity property of a banner tied to consent records for a specific site. Changing it would break the audit trail and violate GDPR consent specificity requirements. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -269,7 +269,6 @@ func (r *mutationResolver) UpdateCookieBanner(ctx context.Context, input types.U
|
||||
cookiebanner.UpdateCookieBannerRequest{
|
||||
CookieBannerID: input.CookieBannerID,
|
||||
Name: input.Name,
|
||||
Origin: input.Origin,
|
||||
PrivacyPolicyURL: input.PrivacyPolicyURL,
|
||||
ConsentExpiryDays: input.ConsentExpiryDays,
|
||||
ConsentMode: input.ConsentMode,
|
||||
@@ -280,9 +279,6 @@ func (r *mutationResolver) UpdateCookieBanner(ctx context.Context, input types.U
|
||||
if errors.Is(err, cookiebanner.ErrBannerNotFound) {
|
||||
return nil, gqlutils.NotFound(ctx, err)
|
||||
}
|
||||
if errors.Is(err, cookiebanner.ErrOriginAlreadyInUse) {
|
||||
return nil, gqlutils.Conflict(ctx, err)
|
||||
}
|
||||
if validationErrors, ok := errors.AsType[validator.ValidationErrors](err); ok {
|
||||
return nil, gqlutils.InvalidValidationErrors(ctx, validationErrors)
|
||||
}
|
||||
|
||||
@@ -274,7 +274,6 @@ input CreateCookieBannerInput {
|
||||
input UpdateCookieBannerInput {
|
||||
cookieBannerId: ID!
|
||||
name: String
|
||||
origin: String
|
||||
privacyPolicyUrl: String
|
||||
consentExpiryDays: Int
|
||||
consentMode: CookieConsentMode
|
||||
|
||||
Reference in New Issue
Block a user