diff options
| author | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 10:18:11 +0200 |
|---|---|---|
| committer | Patrick Seeger <pseeger@ccwn.org> | 2012-04-30 10:18:11 +0200 |
| commit | acec2b5dc35302147f9a9c73d837dce2f3f9958e (patch) | |
| tree | 2f88a3a657a9211331e1e63e056a089189bd0dd2 /protected/modules/auditTrail/controllers/AdminController.php | |
| parent | 56593a21209f3ce55fe66d303dbe01b8e081778b (diff) | |
| parent | 148a216bba21cec1cbe07b60b5191791e0016d6f (diff) | |
Merge branch 'master' of ssh://proxy.ccwn.org:9044/home/ccwn/git-repos/admin.astaf.de
Diffstat (limited to 'protected/modules/auditTrail/controllers/AdminController.php')
| -rw-r--r-- | protected/modules/auditTrail/controllers/AdminController.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/protected/modules/auditTrail/controllers/AdminController.php b/protected/modules/auditTrail/controllers/AdminController.php new file mode 100644 index 0000000..f03b373 --- /dev/null +++ b/protected/modules/auditTrail/controllers/AdminController.php @@ -0,0 +1,46 @@ +<?php + +class AdminController extends Controller +{ + public $defaultAction = "admin"; + public $layout='//layouts/column1'; + + /** + * @return array action filters + */ + public function filters() + { + return array( + 'accessControl', // perform access control for CRUD operations + ); + } + + /** + * Specifies the access control rules. + * This method is used by the 'accessControl' filter. + * @return array access control rules + */ + public function accessRules() + { + return array( + array('allow', // allow admin user to perform actions + 'users'=>array('admin'), + ), + array('deny', // deny all users + 'users'=>array('*'), + ), + ); + } + + public function actionAdmin() + { + $model=new AuditTrail('search'); + $model->unsetAttributes(); // clear any default values + if(isset($_GET['AuditTrail'])) { + $model->attributes=$_GET['AuditTrail']; + } + $this->render('admin',array( + 'model'=>$model, + )); + } +}
\ No newline at end of file |
