auth->getRole(\common\models\User::ROLE_MANAGER); $loginToBackend = $this->auth->createPermission('loginToBackend'); $this->auth->add($loginToBackend); $this->auth->addChild($managerRole, $loginToBackend); } public function down() { $this->auth->remove($this->auth->getPermission('loginToBackend')); } }