Skip to content

chore(config): remove the unused allow block - #71

Merged
Fredxd merged 1 commit into
AppoloDev:mainfrom
Vondry:chore/remove-unused-allow-config
Oct 25, 2026
Merged

Fredxd merged 1 commit into
AppoloDev:mainfrom
Vondry:chore/remove-unused-allow-config

Conversation

@Vondry

@Vondry Vondry commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR removes the commented-out allow: block from config/config.yaml:

# Control who can view the more "scary" fields
# allow:
#    shortlink: [ chief-editor, admin, developer, root ]
#    canonical: [ chief-editor, admin, developer, root ]
#    robots: [ chief-editor, admin, developer, root ]
#    ogtype: [ chief-editor, admin, developer, root ]

Nothing reads it, so it suggests a feature the extension doesn't have. There are no code changes.

Where it came from

  • It came from the original Bolt 3 extension. bobdenotter/seo (which requires bolt/bolt: ^3.0) has the same block in config/config.yml.dist. There, SeoExtension::seoAllowedConfig() checked it against the current user's Bolt 3 roles, and _seo_extension_field.twig used the result to hide those four fields.
  • This package copied the config, not the code. The block arrived in the commit that created config/config.yaml (8f50343, 2020-11-18), but seoAllowedConfig() was never ported. Its role names (chief-editor, admin, developer, root) are Bolt 3 roles, not Bolt 4+ roles such as ROLE_CHIEF_EDITOR.
  • It has never worked here. No release (1.0.0–1.0.12, 2.0.0–2.2.0) and no commit on main has had code that reads allow. Sites that uncommented it saw no effect: every editor still sees all fields.

Impact

None. Existing sites keep their own copy of appolo-boltseo.yaml, because Bolt never updates it. The block in that copy stays harmless, and new installs no longer get it.

Verified

  • git grep over src/, templates/, assets/ and every release tag finds no code that reads allow.
  • config/config.yaml still parses, and vendor/bin/phpunit passes (143 tests, after rebasing onto main).
  • The README never mentioned the option, so it needs no change.

Related

Rebased onto main after #68, which rewrote the templates: comment right below this block. The conflict was only that the two changes sit next to each other.

#74 fixes npm test on main (the shortlink JS test left over from #72). It doesn't touch config/config.yaml, so the two PRs merge in either order.

@Fredxd

Fredxd commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Hi @Vondry
Thanks for PR but i am not able to merge it. Can you make fix please?

Regards

The commented-out `allow:` block promised to limit who can see the
shortlink, canonical, robots and og:type fields, but nothing has ever read
it. It was copied with the rest of the config from the original Bolt 3
extension (bobdenotter/seo), where `SeoExtension::seoAllowedConfig()`
checked it against Bolt 3 user roles. That function wasn't ported, and no
release of this package has had code for it. Sites that uncommented it
showed every field to every editor anyway.
@Vondry

Vondry commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

The failing JS tests job isn't caused by this PR. main has been failing the same test (typing in the SEO shortlink input persists it) since #72 was merged: #72 removed the Shortlink field, but the JS test fixture still expected it.

#74 fixes that test and is green. This PR only removes commented lines from config/config.yaml, and every other check passes.

Once #74 is merged, I'll rebase this branch onto main so CI runs again and the JS job turns green. Re-running the failed job won't help, because it reuses the merge commit with the old test.

@Fredxd
Fredxd merged commit 73c3834 into AppoloDev:main Oct 25, 2026
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants