fix backend user access, fix payout cart account change

This commit is contained in:
2016-02-18 22:51:55 +01:00
parent 0ce6958e0b
commit 84e2badd34
14 changed files with 153 additions and 68 deletions

View File

@@ -21,20 +21,26 @@ use common\components\Upload;
/**
* CardPackageController implements the CRUD actions for CardPackage model.
*/
class CardPackageController extends Controller {
public function behaviors() {
return [
'verbs' => [
'class' => VerbFilter::className (),
'actions' => [
'delete' => [
'post'
]
]
]
class CardPackageController extends \backend\controllers\BackendController {
public function behaviors()
{
return [
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
// allow authenticated users
[
'actions' => ['create','index','view','import','download'],
'allow' => true,
'roles' => ['admin','employee','reception'],
],
// everything else is denied
],
],
];
}
/**
* Lists all CardPackage models.
*