mirror of
https://github.com/elyby/accounts.git
synced 2024-12-28 16:10:40 +05:30
31 lines
734 B
PHP
31 lines
734 B
PHP
<?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) {
|
|
|
|
}
|
|
|
|
}
|