developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #352: auth-fix.patch

File auth-fix.patch, 6.3 KB (added by Julien, 14 years ago)

patch jAuthDummyUser

  • build/manifests/jelix-lib.mn

     
    1616cd lib/jelix/auth
    1717* jAuth.class.php
    1818  jAuthUser.class.php
     19  jAuthDummyUser.class.php
    1920
    2021cd lib/jelix/acl
    2122  jAcl.class.php
  • lib/jelix/plugins/coord/auth/auth.coord.php

     
    33* @package    jelix
    44* @subpackage coord_plugin
    55* @author     Croes Gérald
    6 * @contributor  Laurent Jouanneau, Frédéric Guillot, Antoine Detante
     6* @contributor  Laurent Jouanneau, Frédéric Guillot, Antoine Detante, Julien Issler
    77* @copyright  2001-2005 CopixTeam, 2005-2007 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante
     8* @copyright  2007 Julien Issler
    89*
    910* This class was get originally from an experimental branch of the Copix project
    1011* (PluginAuth, Copix 2.3dev20050901, http://www.copix.org)
     
    1516* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
    1617*/
    1718require_once(JELIX_LIB_AUTH_PATH.'jAuth.class.php');
    18 require_once(JELIX_LIB_AUTH_PATH.'jAuthUser.class.php');
     19require_once(JELIX_LIB_AUTH_PATH.'jAuthDummyUser.class.php');
    1920
    2021/**
    2122* @package    jelix
     
    7374        //Creating the user's object if needed
    7475        if (! isset ($_SESSION[$this->config['session_name']])){
    7576            $notLogged = true;
    76             $_SESSION[$this->config['session_name']] = new jDummyAuthUser();
     77            $_SESSION[$this->config['session_name']] = new jAuthDummyUser();
    7778        }else{
    7879            $notLogged = ! jAuth::isConnected();
    7980        }
  • lib/jelix/init.php

     
    1111* @author   Jouanneau Laurent
    1212#if ENABLE_OPTIMIZED_SOURCE
    1313* @author Croes Gerald
    14 * @contributor Loic Mathaud
     14* @contributor Loic Mathaud, Julien Issler
    1515* @copyright 2005-2007 Jouanneau laurent
    1616* @copyright 2001-2005 CopixTeam
    1717* @copyright 2006 Mathaud Loic
     18* @copyright 2007 Julien Issler
    1819* @link http://www.copix.org
    1920#else
    2021* @contributor Loic Mathaud
     
    135136 */
    136137$gLibPath=array('Db'=>JELIX_LIB_DB_PATH, 'Dao'=>JELIX_LIB_DAO_PATH,
    137138 'Forms'=>JELIX_LIB_FORMS_PATH, 'Event'=>JELIX_LIB_EVENTS_PATH,
    138  'Tpl'=>JELIX_LIB_TPL_PATH, 'Acl'=>JELIX_LIB_ACL_PATH, 'Controller'=>JELIX_LIB_CTRL_PATH);
     139 'Tpl'=>JELIX_LIB_TPL_PATH, 'Acl'=>JELIX_LIB_ACL_PATH, 'Controller'=>JELIX_LIB_CTRL_PATH, 'Auth'=>JELIX_LIB_AUTH_PATH);
    139140
    140141/**
    141142 * __autoload function used by php to try to load an unknown class
    142143 */
    143144function __autoload($class){
    144    if(preg_match('/^j(Dao|Tpl|Acl|Event|Db|Controller|Forms).*$/', $class, $m)){
     145   if(preg_match('/^j(Dao|Tpl|Acl|Event|Db|Controller|Forms|Auth).*$/', $class, $m)){
    145146       $f=$GLOBALS['gLibPath'][$m[1]].$class.'.class.php';
    146147   }elseif(preg_match('/^cDao(?:Record)?_(.+)_Jx_(.+)_Jx_(.+)$/', $class, $m)){
    147148       // pour les dao stockés en sessions notament
  • lib/jelix/auth/jAuthDummyUser.class.php

     
     1<?php
     2/**
     3* @package    jelix
     4* @subpackage auth
     5* @author     Laurent Jouanneau
     6* @contributor Loic Mathaud, Julien Issler
     7* @copyright  2006-2007 Laurent Jouanneau
     8* @copyright  2007 Julien Issler
     9* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
     10*/
     11
     12require_once(JELIX_LIB_AUTH_PATH.'jAuthUser.class.php');
     13
     14/**
     15 * internal use
     16 * @package    jelix
     17 * @subpackage auth
     18 */
     19class jAuthDummyUser extends  jAuthUser {
     20}
     21
     22
     23?>
     24 No newline at end of file
  • lib/jelix/auth/jAuthUser.class.php

     
    33* @package    jelix
    44* @subpackage auth
    55* @author     Laurent Jouanneau
    6 * @contributor Loic Mathaud
     6* @contributor Loic Mathaud, Julien Issler
    77* @copyright  2006-2007 Laurent Jouanneau
     8* @copyright  2007 Julien Issler
    89* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
    910*/
    1011
     
    2223}
    2324
    2425
    25 /**
    26  * internal use
    27  * @package    jelix
    28  * @subpackage auth
    29  */
    30 class jDummyAuthUser extends  jAuthUser {
    31 }
    32 
    33 
    3426?>
    35  No newline at end of file
  • lib/jelix/auth/jAuth.class.php

     
    33* @package    jelix
    44* @subpackage auth
    55* @author     Laurent Jouanneau
    6 * @contributor Frédéric Guillot, Antoine Detante
     6* @contributor Frédéric Guillot, Antoine Detante, Julien Issler
    77* @copyright  2001-2005 CopixTeam, 2005-2007 Laurent Jouanneau, 2007 Frédéric Guillot, 2007 Antoine Detante
     8* @copyright  2007 Julien Issler
    89*
    910* This classes were get originally from an experimental branch of the Copix project (Copix 2.3dev, http://www.copix.org)
    1011* Few lines of code are still copyrighted 2001-2005 CopixTeam (LGPL licence).
     
    336337
    337338        $config = self::_getConfig();
    338339        jEvent::notify ('AuthLogout', array('login'=>$_SESSION[$config['session_name']]->login));
    339         $_SESSION[$config['session_name']] = new jDummyAuthUser();
     340        $_SESSION[$config['session_name']] = new jAuthDummyUser();
    340341        jAcl::clearCache();
    341342        if(isset($config['persistant_enable']) && $config['persistant_enable']){
    342343            if(!isset($config['persistant_cookie_name']))
     
    363364    public static function getUserSession (){
    364365        $config = self::_getConfig();
    365366        if (! isset ($_SESSION[$config['session_name']])){
    366             $_SESSION[$config['session_name']] = new jDummyAuthUser();
     367            $_SESSION[$config['session_name']] = new jAuthDummyUser();
    367368        }
    368369        return $_SESSION[$config['session_name']];
    369370    }