Hand user administration to somebody without handing them the site.
A delegate gets the console — view accounts, disable, reset passwords, end sessions — scoped to users whose role or group membership falls inside their delegation.
Two hard limits
Never administrators. A delegate cannot act on an administrator account under any scope configuration.
Never settings. Site-wide configuration requires manage_options, which a delegate does not have. They cannot change security policy, retention, or their own scope.
How it is enforced
Delegates receive itxuo_manage and list_users dynamically through user_has_cap, and a map_meta_cap filter narrows the edit-class capabilities on out-of-scope targets.
- A route acting on one user asks
current_user_can( 'edit_user', $target ). - A route changing site-wide configuration asks
manage_options.
Both are checks WordPress already understands.
This was wrong once, and the way it was wrong is worth documenting. The original design had REST routes consult the scope through a dedicated itxuo_delegation_allows filter. The filter was declared, documented — and never actually applied anywhere. Every route gated on the flat itxuo_manage capability was therefore unscoped, and a delegate could reset an administrator's two-factor or delete their passkeys. It now works through capabilities WordPress checks natively, so there is no third mechanism that only holds if somebody remembers to call it. The failure mode of the old design was silence; the failure mode of the new one is a route that does not work.
Delegated actions are flagged
Every action a delegate takes is marked as delegated in the activity log, through a meta injector on the event bus.
So the log distinguishes "an administrator disabled this account" from "a delegate disabled this account", without relying on you remembering who held what role at the time.
Setting one up
Choose the user, then the scope: roles they may act on, groups they may act on, or both. Nothing outside that scope is visible to act on.
Reviewing
Delegations are worth re-reading periodically for the same reason administrator lists are. A scope granted for a project outlives the project.