add company-manager role

This commit is contained in:
iIronside
2022-12-01 14:11:29 +03:00
parent 1f349aec84
commit 8cd2eebfee
28 changed files with 812 additions and 82 deletions

View File

@ -35,6 +35,20 @@ class RbacController extends Controller
$auth->assign($admin, 1);
}
/**
* Add company manager role
*/
public function actionCreateCompanyManagerRole()
{
$auth = Yii::$app->getAuthManager();
$role = $auth->createRole('company_manager');
$role->description = 'Менеджер компании контр агента';
$auth->add($role);
$this->stdout('Done!' . PHP_EOL);
}
public function actionCreateEditor()
{
$auth = Yii::$app->authManager;