app\models\Permission::isDeletable PHP Method

isDeletable() public method

public isDeletable ( ) : boolean
return boolean
    public function isDeletable()
    {
        // Protect the guest-only, basic-authenticated and open-to-all permissions from deletion.
        if ('guest-only' == $this->name || 'basic-authenticated' == $this->name || 'open-to-all' == $this->name || $this->is_used) {
            return false;
        }
        // Otherwise
        return true;
    }