Development

Changeset 10134

You must first sign up to be able to contribute.

Changeset 10134

Show
Ignore:
Timestamp:
07/05/08 14:20:24 (3 months ago)
Author:
fabien
Message:

sfGuardPlugin: fixed authorization removal when the session timeout

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfGuardPlugin/branches/1.0/README

    r9297 r10134  
    376376 
    377377=== 1.1.16 PRE === 
     378 
     379  * fabien: fixed authorization removal when the session timeout 
    378380 
    379381=== 1.1.15 === 
  • plugins/sfGuardPlugin/branches/1.0/lib/user/sfGuardSecurityUser.class.php

    r9289 r10134  
    1818class sfGuardSecurityUser extends sfBasicSecurityUser 
    1919{ 
    20   private $user = null; 
     20  protected 
     21    $user = null; 
     22 
     23  public function initialize($context, $parameters = array()) 
     24  { 
     25    parent::initialize($context, $parameters); 
     26 
     27    if (!$this->isAuthenticated()) 
     28    { 
     29      // remove user if timeout 
     30      $this->getAttributeHolder()->removeNamespace('sfGuardSecurityUser'); 
     31      $this->user = null; 
     32    } 
     33  } 
    2134 
    2235  public function hasCredential($credential, $useAnd = true) 
  • plugins/sfGuardPlugin/branches/1.1/README

    r10127 r10134  
    388388=== 2.1.0-PRE === 
    389389 
     390  * fabien: fixed authorization removal when the session timeout 
    390391  * fabien: fixed `guard:promote` task 
    391392  * fabien: added `guard:add-permission` and `guard:add-group` tasks 
  • plugins/sfGuardPlugin/branches/1.1/lib/user/sfGuardSecurityUser.class.php

    r9289 r10134  
    1818class sfGuardSecurityUser extends sfBasicSecurityUser 
    1919{ 
    20   private $user = null; 
     20  protected 
     21    $user = null; 
     22 
     23  public function initialize(sfEventDispatcher $dispatcher, sfStorage $storage, $options = array()) 
     24  { 
     25    parent::initialize($dispatcher, $storage, $options); 
     26 
     27    if (!$this->isAuthenticated()) 
     28    { 
     29      // remove user if timeout 
     30      $this->getAttributeHolder()->removeNamespace('sfGuardSecurityUser'); 
     31      $this->user = null; 
     32    } 
     33  } 
    2134 
    2235  public function getReferer($default)