Gate cookie banner policy regeneration on its own action
RegenerateCookieBannerTrackerPolicy authorized against the generic cookie-banner update action, conflating policy regeneration with banner edits. Add a dedicated regenerate-policy action and authorize both the console and MCP resolvers against it so the capability can be granted independently. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -779,7 +779,7 @@ func (r *mutationResolver) PublishCookieBannerVersion(ctx context.Context, input
|
||||
|
||||
// RegenerateCookieBannerTrackerPolicy is the resolver for the regenerateCookieBannerTrackerPolicy field.
|
||||
func (r *mutationResolver) RegenerateCookieBannerTrackerPolicy(ctx context.Context, input types.RegenerateCookieBannerTrackerPolicyInput) (*types.RegenerateCookieBannerTrackerPolicyPayload, error) {
|
||||
scope, err := r.authorize(ctx, input.CookieBannerID, probo.ActionCookieBannerUpdate)
|
||||
scope, err := r.authorize(ctx, input.CookieBannerID, probo.ActionCookieBannerRegeneratePolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user