Use account switcher with drush commands

Created on 14 July 2023, over 1 year ago
Updated 13 August 2024, 8 months ago

Problem/Motivation

I have a PreSerializeEvent subscriber that changes an entities' workflow state when it has been exported using DCD. It works perfectly when exporting content via the UI (authenticated), but using drush I get this:

$ drush dcder node --bundle=page --force-update --entity_id=1,2,3,4,5

[error]  User Anonymous not allowed to go from state Ready for deployment to Deployed

Proposed resolution

Inject the account_switcher service into the drush command so it can be ran as user 1 instead of anonymous.

🐛 Bug report
Status

Needs work

Version

2.0

Component

Miscellaneous

Created by

🇨🇦Canada smulvih2 Canada 🍁

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024