Permissions & Security
Seo separates site-wide administration from day-to-day content editing so marketing teams can tune page metadata safely without gaining access to global scripts, redirect rules, or environment indexing settings.
Role-Based Access Control (RBAC)
Section titled “Role-Based Access Control (RBAC)”| Permission / Check | Granted Capabilities |
|---|---|
seo-admin |
Full access to Setup -> SEO (ProcessSeo), Global Settings (seo-settings), Identity (seo-identity), Template Rules (seo-mappings), Redirects (seo-redirects), 404 Monitor (seo-404s), CSV import/export, and AI administrative tools (seo_site_health, seo_redirects_*, seo_404_list). |
page-edit + Field-Level Seo::isPageSeoEditable(Page) |
Editors without seo-admin can still edit the embedded SEO field (metadata / @fieldset:seo) on any frontend page where $page->editable($fieldName) is true and PageTargetResolver::isEditableFrontendPage($page) allows it. Admin, trash, system, and protected templates (admin, user, role, permission, language) are always excluded. |
Environment Safeguards
Section titled “Environment Safeguards”Under Setup -> SEO -> Settings -> General & Titles, Environment Mode protects non-production hosts from accidental indexing and analytics contamination:
| Mode | Effective Behavior |
|---|---|
live |
Normal production indexing, sitemaps, and tracking scripts. |
auto |
Automatically treats the site as non-live whenever $config->debug === true (resolving to local) and live when $config->debug === false. |
staging |
Forces noindex, nofollow on every page, disallows all crawlers in /robots.txt, and suppresses GTM, GA4, Meta Pixel, and custom script snippets. |
local |
Identical non-live safeguard behavior as staging for local development hosts. |
Inspect the active safeguard state in PHP via $seo->resolveEffectiveEnvironment(), $seo->isNonLiveEnvironment(), and $seo->isSiteIndexingDiscouraged().
Hardened Admin & Public Boundaries
Section titled “Hardened Admin & Public Boundaries”- CSRF Protection: Every state-changing action in
ProcessSeo(attaching fields, syncing rules, promoting 404s, clearing 404 logs, importing redirects, saving settings or pages) validates$session->CSRF. - Demo Mode Guard (
$config->demo): When$config->demo === true, write operations acrossProcessSeo,SeoTemplatesDataProvider::mutate(), and mutating CLI commands (seo:setup,seo:redirect) are rejected cleanly. - Production Error Masking (
$config->debug === false): Database and internal exceptions are logged to theseolog channel while returning safe generic messages to clients. - Safe Redirect & Import Validation:
RedirectEnginerejects invalid regex patterns, enforcesMAX_PATTERN_RULES = 500, caps chain hops (MAX_CHAIN_HOPS = 5), limits CSV/TXT imports to 5 MB and 5,000 rows, validates uploads via$sanitizer->validateFile(), and validates external redirect hosts viaisAllowedRedirectHost(). - CSV Formula Neutralization (CWE-1236): Redirect and 404 Monitor exports delegate to
Entries::porter(), neutralizing leading=,+,-, and@cells automatically.