Exemple #1
0
 public function __construct()
 {
     parent::__construct();
     $this->setUsersGroupsTable('m3_users_groups');
     $this->setAclPermissionsTable('m3_acl_permissions');
     $this->setResourcesTable('m3_resources');
     $this->_actualResource = null;
 }
Exemple #2
0
 /**
  * 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;
 }