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

@@ -15,20 +15,27 @@ use backend\models\ContractRequestSearch;
/**
* ContractController implements the CRUD actions for Contract model.
*
* TODO: FIX CONTROLLER
*/
class ContractController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
public function behaviors() {
return [
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
// allow authenticated users
[
'actions' => [ ],
'allow' => true,
'roles' => ['admin','employee','reception'],
],
// everything else is denied
],
],
];
}
/**
* Lists all Contract models.