X-Git-Url: https://jasonwoof.com/gitweb/?p=contractor-progress.git;a=blobdiff_plain;f=su.php;h=6f26627427ccf934b9aa1edc545f30f63303376d;hp=d777117dd70c86a78fbdd0eda381a35545fdd036;hb=98110d79b6536290baffd1468f22cb8b046902cd;hpb=f78460b6d888bb82adebd32931d707792bc77710 diff --git a/su.php b/su.php index d777117..6f26627 100644 --- a/su.php +++ b/su.php @@ -18,9 +18,8 @@ require_once('code/wfpl/format.php'); function su_main() { - if(logged_in_as_contractor()) { - set_was_contractor(); - } elseif(!ever_was_contractor()) { + # If you log in to the admin account, you can su to a customer account and still have access to su back to admin. That's why we're checking for admin not "contractor" here. + if(!logged_in_as_admin()) { $GLOBALS['url'] = this_url(); message('You must be logged in as an administrator to access that function'); return 'login';