Базовая реализация API для блокировки аккаунта

This commit is contained in:
ErickSkrauch
2016-12-11 14:37:55 +03:00
parent 213782ff62
commit 28b06d51ce
3 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<?php
namespace api\modules\internal\controllers;
use api\components\ApiUser\AccessControl;
use api\controllers\Controller;
use common\models\OauthScope as S;
use yii\helpers\ArrayHelper;
class AccountsController extends Controller {
public function behaviors() {
return ArrayHelper::merge(parent::behaviors(), [
'access' => [
'class' => AccessControl::class,
'rules' => [
[
'actions' => ['block'],
'allow' => true,
'roles' => [S::ACCOUNT_BLOCK],
],
],
],
]);
}
public function actionBlock(int $accountId) {
}
}