add company-manager role

This commit is contained in:
iIronside committed 2022-12-01 14:12:25 +03:00
1 parent 1f349aec84
commit 8cd2eebfee
28 files changed
+812 -82

No files matched your search

+14
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;