Page MenuHomePhabricator
Paste P1905

audit_project_mfa.sql
ActivePublic

Authored by epriestley on Dec 9 2015, 4:02 PM.
Tags
None
Referenced Files
F1018844: audit_project_mfa.sql
Dec 9 2015, 4:25 PM
F1018817: audit_project_mfa.sql
Dec 9 2015, 4:02 PM
Subscribers
None
SELECT
u.username User, p.name Project, IF(f.id IS NULL, "NO", "YES") "Has MFA"
FROM phabricator_user.user u
LEFT JOIN phabricator_user.edge ue
ON ue.src = u.phid AND ue.type = 14
LEFT JOIN phabricator_project.project p ON ue.dst = p.phid
LEFT JOIN phabricator_auth.auth_factorconfig f ON f.userPHID = u.phid
WHERE p.name = 'Dog Project';

Event Timeline

epriestley changed the title of this paste from untitled to audit_project_mfa.sql.Dec 9 2015, 4:02 PM
epriestley edited the content of this paste. (Show Details)

Locally:

mysql> SELECT u.username User, p.name Project, IF(f.id IS NULL, "NO", "YES") "Has MFA" FROM local_user.user u LEFT JOIN local_user.edge ue ON ue.src = u.phid AND ue.type = 14 LEFT JOIN local_project.project p ON ue.dst = p.phid LEFT JOIN local_auth.auth_factorconfig f ON f.userPHID = u.phid WHERE p.name = 'Dog Project';
+------+-------------+---------+
| User | Project     | Has MFA |
+------+-------------+---------+
| dog  | Dog Project | NO      |
+------+-------------+---------+
1 row in set (0.00 sec)