Sugarcrm:条件只读字段的自定义依赖项

I want to make all fields/the entire record readonly once the sales stage is "Closed Won" and the user is not an administrator.

<?php
global $current_user;
$dependencies['Opportunities']['lock_opportunity_dep'] = array(
    'hooks' => array("edit"),
    'trigger' => 'and(equal($sales_stage, "Closed Won"),equal($current_user->is_admin, true))',
    //'triggerFields' => array('sales_stage'),
    'onload' => true,
    'actions' => array(
        array(
            'name' => 'ReadOnly',
            'params' => array(
                'target' => 'description',
                'value' => 'true',
            ),
        ),
        //.. all other fields here...
        array(
            'name' => 'ReadOnly',
            'params' => array(
                'target' => 'name',
                'value' => 'true',
            ),
        ),
    ),
);

The above does not work; when I remove the admin check, the fields are locked correctly, so it appears $current_user cannot be used as part of the trigger because it is not a field in the Opportunity module.

  1. How do I check whether the current user is an admin and use it as part of the trigger?
  2. How can I loop through all fields in the module (in this case, Opportunities) instead of having to manually specify a ReadOnly array for each field?