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:
@@ -5826,7 +5826,7 @@ func (r *Resolver) PublishCookieBannerVersionTool(ctx context.Context, req *mcp.
|
||||
}
|
||||
|
||||
func (r *Resolver) RegenerateCookieBannerTrackerPolicyTool(ctx context.Context, req *mcp.CallToolRequest, input *types.RegenerateCookieBannerTrackerPolicyInput) (*mcp.CallToolResult, types.RegenerateCookieBannerTrackerPolicyOutput, error) {
|
||||
scope, err := r.Authorize(ctx, input.CookieBannerID, probo.ActionCookieBannerUpdate)
|
||||
scope, err := r.Authorize(ctx, input.CookieBannerID, probo.ActionCookieBannerRegeneratePolicy)
|
||||
if err != nil {
|
||||
return nil, types.RegenerateCookieBannerTrackerPolicyOutput{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user