| [ Index ] |
PHP Cross Reference of Limb3 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 * Limb PHP Framework 4 * 5 * @link http://limb-project.com 6 * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com) 7 * @license LGPL http://www.gnu.org/copyleft/lesser.html 8 */ 9 lmb_require('limb/filter_chain/src/lmbInterceptingFilter.interface.php'); 10 11 /** 12 * class lmbCmsAccessPolicyFilter. 13 * 14 * @package cms 15 * @version $Id$ 16 */ 17 class lmbCmsAccessPolicyFilter implements lmbInterceptingFilter 18 { 19 function run($filter_chain) 20 { 21 $toolkit = lmbToolkit :: instance(); 22 $user = $toolkit->getUser(); 23 $current_path = '/' . ltrim($toolkit->getRequest()->getUriPath(), '/'); 24 25 if(strpos($current_path, '/admin') === 0 && !$user->isLoggedIn()) 26 { 27 $toolkit->flashMessage("Not enough access permissions"); 28 $toolkit->redirect(array('controller' => 'user', 'action' => 'login'), '?redirect=' . $current_path); 29 return; 30 } 31 32 $filter_chain->next(); 33 } 34 } 35 36 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Dec 5 04:05:07 2008 | Cross-referenced by PHPXref 0.7 |