Add BackendController/AccesControl
Add the BackendController for all the backend controllers. Add AccesControl
This commit is contained in:
@@ -29,43 +29,42 @@ class AdminMenuStructure{
|
||||
|
||||
$userMainMenu = null;
|
||||
$items = [];
|
||||
|
||||
//$today = \Yii::$app->formatter->asDate( time() );
|
||||
$today = \Yii::$app->formatter->asDate( strtotime('today UTC') );
|
||||
$tomorrow = \Yii::$app->formatter->asDate( ( 60 *60 *24 + time()));
|
||||
|
||||
// if ( $this->can('backend.user.index')){
|
||||
$items[] = ['label' => 'Felhasználók', 'url' =>['/user/index']];
|
||||
// }
|
||||
|
||||
$items[] = ['label' => 'Raktárak', 'url' =>['/warehouse/index']];
|
||||
$items[] = ['label' => 'Kasszák', 'url' =>['/account/index']];
|
||||
$items[] = ['label' => 'Kedvezmények', 'url' => ['/discount/index'] ];
|
||||
$items[] = ['label' => 'Termék kategóriák', 'url' => ['/product-category/index'] ];
|
||||
$items[] = ['label' => 'Bérlet típusok', 'url' => ['/ticket-type/index'] ];
|
||||
$items[] = ['label' => 'Termékek', 'url' => ['/product/index'] ];
|
||||
$items[] = ['label' => 'Beszerzések', 'url' => ['/procurement/index'] ];
|
||||
$items[] = ['label' => 'Vendégek', 'url' => ['/customer/index'] ];
|
||||
$items[] = ['label' => 'Bérletkártyák', 'url' => ['/card/index'] ];
|
||||
$items[] = ['label' => 'Pénznem', 'url' => ['/currency/index'] ];
|
||||
if (!Yii::$app->user->isGuest) {
|
||||
|
||||
|
||||
|
||||
|
||||
$items[] = ['label' => 'Tranzakciók', 'url' => ['/transfer/index' , 'TransferSearch[start]' =>$today,'TransferSearch[end]' => $tomorrow ] ];
|
||||
$items[] = ['label' => 'Kassza müveletek', 'url' => ['/account-state/index'] ];
|
||||
|
||||
if ( count($items) > 0 ){
|
||||
$userMainMenu = ['label' => 'Beállítások', 'url' => null,
|
||||
'items' => $items
|
||||
];
|
||||
//$today = \Yii::$app->formatter->asDate( time() );
|
||||
$today = \Yii::$app->formatter->asDate( strtotime('today UTC') );
|
||||
$tomorrow = \Yii::$app->formatter->asDate( ( 60 *60 *24 + time()));
|
||||
|
||||
// if ( $this->can('backend.user.index')){
|
||||
$items[] = ['label' => 'Felhasználók', 'url' =>['/user/index']];
|
||||
// }
|
||||
|
||||
$items[] = ['label' => 'Raktárak', 'url' =>['/warehouse/index']];
|
||||
$items[] = ['label' => 'Kasszák', 'url' =>['/account/index']];
|
||||
$items[] = ['label' => 'Kedvezmények', 'url' => ['/discount/index'] ];
|
||||
$items[] = ['label' => 'Termék kategóriák', 'url' => ['/product-category/index'] ];
|
||||
$items[] = ['label' => 'Bérlet típusok', 'url' => ['/ticket-type/index'] ];
|
||||
$items[] = ['label' => 'Termékek', 'url' => ['/product/index'] ];
|
||||
$items[] = ['label' => 'Beszerzések', 'url' => ['/procurement/index'] ];
|
||||
$items[] = ['label' => 'Vendégek', 'url' => ['/customer/index'] ];
|
||||
$items[] = ['label' => 'Bérletkártyák', 'url' => ['/card/index'] ];
|
||||
$items[] = ['label' => 'Pénznem', 'url' => ['/currency/index'] ];
|
||||
|
||||
$items[] = ['label' => 'Tranzakciók', 'url' => ['/transfer/index' , 'TransferSearch[start]' =>$today,'TransferSearch[end]' => $tomorrow ] ];
|
||||
$items[] = ['label' => 'Kassza müveletek', 'url' => ['/account-state/index'] ];
|
||||
|
||||
if ( count($items) > 0 ){
|
||||
$userMainMenu = ['label' => 'Beállítások', 'url' => null,
|
||||
'items' => $items
|
||||
];
|
||||
}
|
||||
|
||||
if ( isset($userMainMenu)){
|
||||
$this->menuItems[] = $userMainMenu;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($userMainMenu)){
|
||||
$this->menuItems[] = $userMainMenu;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user