Beispiel #1
0
 public function before()
 {
     _root::getAuth()->enable();
     //on check les permissions
     if (!_root::getACL()->can('edit', 'acl')) {
         _root::redirect('prive::list');
     }
     $this->oLayout = new _layout('template1');
     $this->oLayout->addModule('menu', 'menu::index');
 }
 public function enable()
 {
     _root::startSession();
     $sModuleToLoad = _root::getRequest()->getModule();
     if (preg_match('/::/', _root::getConfigVar('auth.module'))) {
         $tModuleAction = preg_split('/::/', _root::getConfigVar('auth.module'));
         $sAuthModule = $tModuleAction[0];
     } else {
         $sAuthModule = _root::getConfigVar('auth.module');
     }
     if (!_root::getAuth()->isConnected() and $sModuleToLoad != $sAuthModule) {
         _root::redirect(_root::getConfigVar('auth.module'));
     }
 }
Beispiel #3
0
 public function enable()
 {
     _root::startSession();
     $sModuleToLoad = _root::getRequest()->getModule();
     if (preg_match('/::/', _root::getConfigVar('auth.module'))) {
         $tModuleAction = preg_split('/::/', _root::getConfigVar('auth.module'));
         $sAuthModule = $tModuleAction[0];
     } else {
         $sAuthModule = _root::getConfigVar('auth.module');
     }
     $tExcludeModule = explode(',', _root::getConfigVar('auth.module.disabled.list') . ',');
     $tExcludeModule[] = $sAuthModule;
     if (!_root::getAuth()->isConnected() and in_array($sModuleToLoad, $tExcludeModule) == false) {
         _root::redirect(_root::getConfigVar('auth.module'));
     }
 }
Beispiel #4
0
 public function _logout()
 {
     _root::getAuth()->logout();
 }
Beispiel #5
0
 public function before()
 {
     _root::getAuth()->enable();
     $this->oLayout = new _layout('template1');
     $this->oLayout->addModule('menu', 'menu::index');
 }
Beispiel #6
0
    } else {
        ?>
		<li><a href="<?php 
        echo $this->getLink($sLink);
        ?>
"><?php 
        echo $sLibelle;
        ?>
</a></li>
	<?php 
    }
    ?>
	
<?php 
}
?>

<?php 
if (_root::getAuth()->isConnected()) {
    ?>
	<li><a href="<?php 
    echo _root::getLink('auth::logout');
    ?>
">Se deconnecter</a></li>
<?php 
}
?>

</ul>