HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
RController.php
Go to the documentation of this file.
1 <?php
10 class RController extends CController
11 {
16  public $layout = '//layouts/column1';
20  public $menu = array();
26  public $breadcrumbs = array();
27 
34  public function filterRights($filterChain)
35  {
36  $filter = new RightsFilter();
37  $filter->allowedActions = $this->allowedActions();
38  $filter->filter($filterChain);
39  }
40 
44  public function allowedActions()
45  {
46  return '';
47  }
48 
57  public function accessDenied($message = null)
58  {
59  if ($message === null) {
60  $message = Rights::t('core', 'You are not authorized to perform this action.');
61  }
62 
63  $user = Yii::app()->getUser();
64  if ($user->isGuest === true) {
65  $user->loginRequired();
66  } else {
67  throw new CHttpException(403, $message);
68  }
69  }
70 }