dektrium\rbac\controllers\RuleController::actionDelete PHP Method

actionDelete() public method

Removes rule.
public actionDelete ( string $name ) : string
$name string
return string
    public function actionDelete($name)
    {
        $rule = $this->findRule($name);
        $this->authManager->remove($rule);
        $this->authManager->invalidateCache();
        \Yii::$app->session->setFlash('success', \Yii::t('rbac', 'Rule has been removed'));
        return $this->redirect(['index']);
    }