public getPermission ( string $name ) : null | |
||
$name | string | the permission name. |
return | null | |
the permission corresponding to the specified name. Null is returned if no such permission. |
public function getPermission($name);
public function actionAjaxChildRemove($name) { $role = $this->findRole($name); $namePermission = Yii::$app->request->post('permission'); $permission = $this->auth->getPermission($namePermission); return $this->auth->removeChild($role, $permission) ? 'success' : 'fail'; }