Skip to content

Disabling callbacks based on Expression language #21

@tristanbes

Description

@tristanbes

Hello,

Right now we can disable a callback via enabled: false.
Wouldn't be awesome if we could put Expressions using the ExpressionEngine instead of a boolean ?

Use case: feature flags
This way we could enable/disable callbacks with business logic instead of adding the logic itself inside the callback code wenever possible.

callbacks:
    my_callback:
        ...
        enabled: "object.getSettings().hasFeature('email_enabled')"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions