Editorial Drupal permissions audit showing editorial jobs mapped to roles, reviewed in a permission matrix, tested and approved

Editorial illustration; the roles, permissions and user interface are representative examples, not a live Drupal site.

Drupal permissions rarely break on day one, because day one usually has one developer and one site owner with full admin access. The mess starts six months later: a copywriter needs to update a landing page, a translator needs to edit Bahasa Melayu nodes, a marketing intern needs to upload event banners, and someone gives all three the administrator role just to unblock them before a launch. Once that shortcut becomes normal, a single compromised password—or one accidental click in Configuration—can take down the whole site.

A good permissions audit is not about stripping roles down to the bare minimum for the sake of it. It is about making sure every permission on the site exists for a documented job, behaves the way you expect on staging, and can be understood by the next developer who inherits config/sync.

Take a baseline before touching anything

Never start an audit by deleting roles or unticking boxes in production. First, export and record what you actually have—roles, assigned users, and enabled modules, including custom modules that may have quietly added permissions during past releases:

drush config:export -y
drush role:list
drush pm:list --status=enabled --type=module

If you inspect the exported config/sync/user.role.*.yml files in Git, you can see the exact permission list for every role side by side. Look closely for is_admin: true—any role with that flag bypasses granular permission checks entirely and gets everything, including newly installed module permissions.

Map real editorial jobs, not org-chart titles

Write down what people actually do on the site in plain language before looking at Drupal’s permission matrix. “Marketing team” is too vague to audit. Instead, list concrete tasks:

  • create and edit article drafts;
  • publish or unpublish reviewed articles;
  • upload media assets and edit alt text;
  • translate specific content types;
  • manage user accounts or change site configuration.

Assign each task to a clear boundary. For example: “Content Editor can create, edit, and submit articles for review, but cannot publish directly or access module settings.” Separating content work from site administration (administer modules, administer views, administer permissions, administer site configuration) is the single highest-value boundary you can draw. If one person genuinely wears both hats, keep their day-to-day account on the editor role and use a separate named admin account only when deploying or changing config.

If your site uses a formal review flow, tie publishing rights to moderation states rather than giving everyone bypass node access. The workflow in Drupal Content Moderation: A Practical Editorial Workflow shows why state transitions and role permissions solve different problems.

Build a simple permission matrix

Create a lightweight table—a Markdown file in the repo or a shared spreadsheet—with roles as columns and key capabilities as rows (create, edit own, edit any, publish, view private files, administer config). For every allowed cell, write a one-line reason.

# Example: config/sync/user.role.content_editor.yml
id: content_editor
label: 'Content Editor'
is_admin: false
permissions:
  - 'access content overview'
  - 'create article content'
  - 'edit any article content'
  - 'use editorial transition create_new_draft'
  - 'use editorial transition review'

Notice what is not in that list: no delete any article content, no administer nodes, and no administer users. If nobody on the team can explain why a role has a specific permission—especially after a contributed module update—flag it for review on staging rather than guessing.

Check the anonymous boundary and private files

Teams often audit logged-in roles and completely forget what an unauthenticated visitor can reach. Open a private browser window (or use curl with no session cookie) and test unpublished node URLs, Views endpoints, JSON:API routes, Webform submissions, and private file paths (/system/files/...).

A hidden link in the admin toolbar is not access control. If a View lacks a role or permission filter, an anonymous visitor who guesses the URL can still read it. Verify both what anonymous users can see and what they must be blocked from seeing.

Test both allowed and denied paths on staging

Before deploying permission changes, test each role on a staging environment with representative content. For every role, run one action that must succeed and one action that must return 403 Access Denied. For example, log in as a content_editor, confirm they can save a draft and upload an image, then hit /admin/modules and /admin/config directly by URL to confirm Drupal blocks them cleanly without leaking stack traces or admin data.

Whenever you install or update a contributed or custom module, check git diff config/sync after exporting config and review any new permissions the module introduced. Vague permission labels deserve a quick look at the module’s .permissions.yml or source code so you know what administer <thing> actually unlocks.

Clean up stale accounts and shared logins

Finally, audit who holds each role. Remove accounts for staff or former agency contractors who have moved on, downgrade temporary elevated access that was granted for a past migration, and eliminate shared logins where multiple people use one editor@company.com account. Named accounts with the smallest role needed for their actual work make both troubleshooting and security reviews vastly simpler.

Keep the permission matrix next to your deployment notes and revisit it whenever you add a new content type, workflow, or module. A permission model that a new developer can read in five minutes is far easier to keep secure than a clever setup that lives only in one administrator’s head.

Sources