Skip to content

fix: fail closed for Compose assets, then track jQuery removal #87

Description

@chubes4

Immediate bug

The Studio render and REST gates fail closed when ec_is_team_member() is unavailable, but some asset/editor conditions still use:

function_exists( 'ec_is_team_member' ) && ! ec_is_team_member()

That shape does not deny access when the helper is missing. As a result, editor dependencies or jQuery preservation may run for logged-in non-team users even though the Studio app itself does not render.

Relevant files:

  • inc/assets.php
  • inc/compose-editor.php
  • src/blocks/studio/render.php as the correct fail-closed reference

Immediate acceptance criteria

  • Every Studio asset/editor gate allows administrators or a present helper returning true.
  • Missing team helper denies all non-administrator Studio assets and editor setup.
  • Tests/source contracts cover logged out, administrator, team, non-team, and missing-helper states.

Long-term tracking

Studio currently preserves jQuery while Compose is active because the Blocks Everywhere/editor stack requires it.

Remove that compatibility behavior only after verifying the current upstream editor dependency no longer needs jQuery. Do not replace it with Studio-specific editor bootstrap code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions