Skip to content

Prevent non-super admins from unlocking the slug #360

Closed

Description

@antontcymbal

It's used in the app in certain places. For example, for quick meditations there are slugs that define their durations, i.e.
"slug": "quick-meditation--10-min", and inside it there are "morningMeditation", "afternoonMeditation" и "eveningMeditation"

This is the only reliable way to serve to the users the exact meditation editors have set in the CMS, as duration can vary, for example sometimes it is 7 min for a 5 min slot.

So non-super admins shouldn't be able to unlock the slug field.

Activity

  1. Ardnived commented on May 8, 2026

    @Ardnived
    Contributor

    @antontcymbal Using the slug to filter the timings is an anti-pattern.

    I agree that we should block non-admins from unlocking slugs, but the reason you've raised this ticket raises a deeper issue. Instead of relying on the slug value, you should be querying https://cloud.sydevelopers.com/api/user-choices?type=duration&sort=order, and then display those results as buttons using the title and icon provided by the server.

    This will result in your having localized text and an easily configurable number of quick meditation filters, and you will already have the relevant meditation references loaded.

    Currently it sounds like you are hard coding the quick meditation buttons and then relying on these slugs to query for the result.

  2. added a commit that references this issue on May 13, 2026
    7702cb0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Hold Until

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions