public function __construct() { parent::__construct(); $this->setUsersGroupsTable('m3_users_groups'); $this->setAclPermissionsTable('m3_acl_permissions'); $this->setResourcesTable('m3_resources'); $this->_actualResource = null; }
/** * Configura los permisos de acceso al sistema a los grupos de usuarios * @return bool|resource Regresa true si el usuario tiene acceso , en caso de fallar regresa false */ public function isAllowed($user, $group) { $autorizacion = Model3_Acl::getPermissionMode(); if (!in_array($user, $this->_dUsers)) { if (in_array($user, $this->_aUsers)) { $autorizacion = true; } else { if (!in_array($group, $this->_dGroups)) { if (in_array($group, $this->_aGroups)) { $autorizacion = true; } } } } return $autorizacion; }