Skip to content
Snippets Groups Projects

3396206: Alter AMA Drush commands to run as UID 1 admin.

Closes #3396206

Merge request reports

Members who can merge are allowed to add commits.

Merge request pipeline #112370 failed

Merge request pipeline failed for 29b65f8a

Test summary results are being parsed
Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 1 <?php
2 2
3 3 declare(strict_types=1);
4
  • 34 33 use Symfony\Component\Console\Output\ConsoleSectionOutput;
    35 34 use Symfony\Component\Console\Output\OutputInterface;
    36 35 use Symfony\Component\Console\Terminal;
    36 use Consolidation\AnnotatedCommand\CommandData;
    37 use Drupal\Core\Session\AccountSwitcherInterface;
    38 use Drupal\Core\Session\UserSession;
  • Wim Leers
  • Wim Leers
  • 1770 $this->accountSwitcher->switchBack();
    1771 }
    1772
    1773 }
    1774
    1775 /**
    1776 * Determines if a command is an AMA command.
    1777 *
    1778 * @param \Consolidation\AnnotatedCommand\CommandData $command_data
    1779 * The command to check.
    1780 *
    1781 * @return bool
    1782 * Whether or not this command is an AMA command.
    1783 */
    1784 public function isAmaCommand(CommandData $command_data) {
    1785 return $command_data->annotationData()->get('validate-module-enabled') === 'acquia_migrate';
  • Bryan Jiencke added 1 commit

    added 1 commit

    • 8962c3a6 - 3396206: Adjust for coding standards and logic to determine AMA command.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 41bcba35 - Awesome! GitLab can apply suggestions this simply now.

    Compare with previous version

  • 1771 $this->accountSwitcher->switchBack();
    1772 }
    1773
    1774 }
    1775
    1776 /**
    1777 * Determines if a command is an AMA command.
    1778 *
    1779 * @param \Consolidation\AnnotatedCommand\CommandData $command_data
    1780 * The command to check.
    1781 *
    1782 * @return bool
    1783 * Whether or not this command is an AMA command.
    1784 */
    1785 public function isAmaCommand(CommandData $command_data) {
    1786 return ($command_data->annotationData()->get('_classname') === AcquiaMigrateCommands::class);
  • Bryan Jiencke added 2 commits

    added 2 commits

    • 86b65fe4 - 3396206: Pull recommendations branch from upstream instead of origin.
    • ec88c9dc - Merge branch '3396206-ama-drush-command-as-admin' of...

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • b616c4d6 - 3396206: Check if build passes clean.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 5905d06e - 3396206: Check if build passes clean undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 1882371a - 3396206: Check if build passes clean undo.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • 1b8b6e9b - 3396206: Check if build passes clean.

    Compare with previous version

  • Bryan Jiencke added 1 commit

    added 1 commit

    • cac44d89 - 3396206: Check if build passes clean.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Bryan Jiencke added 13 commits

    added 13 commits

    • 37aed84f...8962c3a6 - 3 earlier commits
    • 41bcba35 - Awesome! GitLab can apply suggestions this simply now.
    • 86b65fe4 - 3396206: Pull recommendations branch from upstream instead of origin.
    • ec88c9dc - Merge branch '3396206-ama-drush-command-as-admin' of...
    • bc3e4bd7 - 3396206: Pull recommendations branch from upstream instead of origin undo.
    • b616c4d6 - 3396206: Check if build passes clean.
    • 5905d06e - 3396206: Check if build passes clean undo.
    • 1882371a - 3396206: Check if build passes clean undo.
    • 1b8b6e9b - 3396206: Check if build passes clean.
    • cac44d89 - 3396206: Check if build passes clean.
    • d2fb94a1 - Project setup.

    Compare with previous version

  • added 1 commit

    • 121fa15d - 3396206: Check if build passes clean.

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading