Skip to content

Commit

Permalink
Fix tugboat steps that disable saml
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Oct 31, 2023
1 parent 34c3a4e commit 63959a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@ services:

- drush @hs_colorful.local cr
- blt drupal:update --site=hs_colorful
- drush @hs_traditional.local pmu simplesamlphp_auth -y

- drush @hs_traditional.local cr
- blt drupal:update --site=hs_traditional
- drush @hs_colorful.local pmu simplesamlphp_auth -y

# Collection of urls to compare visual results.
urls:
Expand Down
20 changes: 14 additions & 6 deletions blt/src/Blt/Plugin/Commands/HsCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function roleReport($role) {
$emails = $this->taskDrush()
->alias("$site.prod")
->drush('sqlq')
->arg('SELECT GROUP_CONCAT(d.mail) FROM users_field_data d INNER JOIN user__roles r ON d.uid = r.entity_id WHERE r.roles_target_id = "' . $role . '" and d.mail NOT LIKE "%localhost%"')
->arg('SELECT d.mail FROM users_field_data d INNER JOIN user__roles r ON d.uid = r.entity_id WHERE r.roles_target_id = "' . $role . '" and d.mail NOT LIKE "%localhost%"')
->printOutput(FALSE)
->run()
->getMessage();
Expand All @@ -42,12 +42,20 @@ public function roleReport($role) {
else {
$site_url .= "-prod";
}
if ($emails) {
$emails = array_filter(explode("\n", $emails));
}
if(!$emails) {
continue;
}
foreach ($emails as $email) {
$information[] = [
'site' => $site,
'url' => "https://$site_url.stanford.edu",
'users' => $email,
];
}

$information[] = [
'site' => $site,
'url' => "https://$site_url.stanford.edu",
'users' => $emails == 'NULL' ? '' : $emails,
];
}
$out = fopen('php://output', 'w');
fputcsv($out, ['Site', 'Url', 'Emails']);
Expand Down

0 comments on commit 63959a5

Please sign in to comment.