/
var
/
www
/
html
/
sugar13-old
/
data
/
acl
/
Upload File
HOME
<?php /* * Your installation or use of this SugarCRM file is subject to the applicable * terms available at * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. * If you do not agree to all of the applicable terms or do not have the * authority to bind the entity as an authorized representative, then do not * install or use this SugarCRM file. * * Copyright (C) SugarCRM Inc. All rights reserved. */ class SugarACLEmailAddress extends SugarACLStrategy { /** * Check access to the email field * @param string $module * @param string $view * @param array $context * @return bool|void */ public function checkAccess($module, $view, $context) { if ($view != 'field') { return true; } if ($context['field'] != 'email') { return true; } $bean = self::loadBean($module, $context); return $bean->ACLFieldAccess('email1',$context['action']); } /** * Load bean from context * @static * @param string $module * @param array $context * @return SugarBean */ protected static function loadBean($module, $context = array()) { if(isset($context['bean']) && $context['bean'] instanceof SugarBean && $context['bean']->module_dir == $module) { $bean = $context['bean']; } else { $bean = BeanFactory::newBean($module); } return $bean; } }