Changeset 17488
- Timestamp:
- 04/21/09 15:12:03 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/nDoctrineRowLevelSecurityPlugin/lib/Doctrine_Template_RowLevelSecurity.php
r17469 r17488 3 3 4 4 5 class Doctrine_Template_ nRowLevelSecurity extends Doctrine_Template {5 class Doctrine_Template_RowLevelSecurity extends Doctrine_Template { 6 6 7 7 … … 26 26 public function setUp() 27 27 { 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 31 32 32 33 $this->_plugin->initialize($this->_table); … … 45 46 } 46 47 48 /*public function getCredentials () { 49 50 //return $this->_invoker->getTable()->; 51 }*/ 47 52 48 53 } plugins/nDoctrineRowLevelSecurityPlugin/lib/nRowLevelSecurity_Listener.php
r17475 r17488 19 19 * @return void 20 20 */ 21 public function __construct( RowLevelSecurity $RowLevelSecurity)21 public function __construct(nRowLevelSecurity $RowLevelSecurity) 22 22 { 23 23 $this->_rls = $RowLevelSecurity; … … 28 28 protected function setCredentials(nRowLevelSecurity_sfUser $nRLS_User = null) { 29 29 if ($nRLS_User == null) { 30 $nRLS_User = nRowLevelSecurity_ User::getInstance();30 $nRLS_User = nRowLevelSecurity_sfUser::getInstance(); 31 31 } 32 32 $this->credentials = $nRLS_User->getCredentials();