Skip to content

Allow whitelisted dynamic defaults #3128

@dmos62

Description

@dmos62

Problem

We currently don't support adding (or redefining) column defaults that are dynamic. Also, currently we're not set up to provide arbitrary dynamic defaults without compromising security of Mathesar.

Proposed solution

We can allow setting dynamic defaults for a column, without compromising security, by restricting the possible dynamic defaults to a whitelist. How a whitelist could be compiled was discussed here: we decided that a manually compiled whitelist is the most practical option.

Additional context

Dynamic defaults feature discussion thread: #2272
User's request for dynamic defaults: #2754
Discussion on how to generate the whitelist: #3078

Tasks

Incomplete list of tasks see posts in this thread for an adhoc articulation of what a full solution would involve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects: uxRelated to user experiencereadyReady for implementationtype: enhancementuser reportedReported by a Mathesar userwork: backendRelated to Python, Django, and simple SQLwork: frontendRelated to frontend code in the mathesar_ui directory

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions