Development

Changeset 17488

You must first sign up to be able to contribute.

Changeset 17488

Show
Ignore:
Timestamp:
04/21/09 15:12:03 (4 years ago)
Author:
nbijnens
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/nDoctrineRowLevelSecurityPlugin/lib/Doctrine_Template_RowLevelSecurity.php

    r17469 r17488  
    33 
    44 
    5 class Doctrine_Template_nRowLevelSecurity extends Doctrine_Template { 
     5class Doctrine_Template_RowLevelSecurity extends Doctrine_Template { 
    66   
    77   
     
    2626    public function setUp() 
    2727    { 
    28       $this->hasMany($this->_invoker->getTable()->getTableName() . ' as Credentials', array('refClass' => 'sfGuardUserGroup', 
    29                                                    'local' => 'user_id', 
    30                                                    'foreign' => 'group_id')); 
     28      $this->_invoker->hasMany('sfGuardPermissions'  . ' as Credentials', array('refClass' => $this->_invoker->getTable()->getTableName() . 'Credential', 
     29                                                   'local' => $this->_invoker->getTable()->getTableName() . '_id', 
     30                                                   'foreign' => 'credential_id')); 
     31 
    3132       
    3233        $this->_plugin->initialize($this->_table);  
     
    4546    } 
    4647     
     48    /*public function getCredentials () { 
     49       
     50      //return $this->_invoker->getTable()->; 
     51    }*/ 
    4752   
    4853} 
  • plugins/nDoctrineRowLevelSecurityPlugin/lib/nRowLevelSecurity_Listener.php

    r17475 r17488  
    1919     * @return  void 
    2020     */ 
    21     public function __construct(RowLevelSecurity $RowLevelSecurity)  
     21    public function __construct(nRowLevelSecurity $RowLevelSecurity)  
    2222    { 
    2323        $this->_rls = $RowLevelSecurity; 
     
    2828    protected function setCredentials(nRowLevelSecurity_sfUser $nRLS_User = null) { 
    2929      if ($nRLS_User == null) { 
    30         $nRLS_User = nRowLevelSecurity_User::getInstance(); 
     30        $nRLS_User = nRowLevelSecurity_sfUser::getInstance(); 
    3131      } 
    3232      $this->credentials = $nRLS_User->getCredentials();