Archived
1
0
Fork 0
This repository has been archived on 2026-05-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fiktivkod/application/modules/admin/controllers/IndexController.php
2011-02-26 14:15:01 +01:00

22 lines
No EOL
509 B
PHP

<?php
class Admin_IndexController extends Fiktiv_Controller_Action
{
public function preDispatch() {
$acl = Zend_Registry::get('Zend_Acl');
$auth = Zend_Auth::getInstance();
if (!$auth->hasIdentity() || !$acl->isAllowed($auth->getIdentity()->userRole, 'admin', 'read')) {
$this->_redirect('/');
exit;
}
}
public function indexAction()
{
$posts = new ModelBlogPost();
$this->view->posts = $posts->fetchAll();
}
}