You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo You will need to review the users database to make sure we\'re eliminating all staff/test users.
17
19
prompt_continue
18
20
19
-
eliminators="name NOT SIMILAR TO '@room-[[:digit:]]+:$(date +%Y).seagl.org' AND admin = 0 AND name NOT IN $elimination_set"
20
-
remote_psql "SELECT name, admin, user_type, deactivated, approved, locked, suspended FROM users WHERE $eliminators;"
21
+
with_nonstaff_clause="WITH non_staff_users AS (SELECT "'*'" FROM users WHERE name NOT SIMILAR TO '@room-[[:digit:]]+:$(date +%Y).seagl.org' AND admin = 0 AND name NOT IN $elimination_set)"
echo'(suppressed due to suspected attend portal bugginess - device names did not correspond to UAs)'
32
+
echo
33
+
#remote_psql "$with_nonstaff_clause SELECT display_name AS \\\"Device display name\\\", COUNT(display_name) AS \\\"Registered devices\\\" FROM devices INNER JOIN non_staff_users ON non_staff_users.name = devices.user_id WHERE display_name != 'master signing key' AND display_name != 'self_signing signing key' AND display_name != 'user_signing signing key' GROUP BY display_name;"
remote_psql "$with_nonstaff_clause SELECT count AS \\\"Number of devices registered\\\", COUNT(count) AS \\\"Users in population\\\" FROM (SELECT user_id, COUNT(user_id) FROM devices INNER JOIN non_staff_users ON non_staff_users.name = devices.user_id WHERE display_name != 'master signing key' AND display_name != 'self_signing signing key' AND display_name != 'user_signing signing key' GROUP BY user_id) GROUP BY count;"
37
+
38
+
remote_psql "$with_nonstaff_clause SELECT user_agent FROM devices INNER JOIN non_staff_users ON non_staff_users.name = devices.user_id WHERE display_name != 'master signing key' AND display_name != 'self_signing signing key' AND display_name != 'user_signing signing key';" -t | grep -Ev '\([[:digit:]]+ rows\)'| node $(dirname $BASH_SOURCE)/process-uas.js | sort | uniq -c | sort -rh | sed 's/^[[:space:]]*//'| column -t -s'' --table-columns-limit 2 -o ' | '
0 commit comments