diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f9d71..e4d3bfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ Types of changes: `Added`, `Changed`, `Deprecate`, `Removed`, `Fixed`, `Secruity ## [Unreleased] +## v2.1.1 - 26.02.2024 - Fixed huge logic issue with allowed functions + +### Fixed +- Fixed issue that the `allowDelete` function was called when `allowEdit` should have been called + ## v2.1.0 - 24.02.2024 - Used entities can no longer be deleted ### Added diff --git a/framework/Database/BaseModel.php b/framework/Database/BaseModel.php index decc9d2..49a680b 100644 --- a/framework/Database/BaseModel.php +++ b/framework/Database/BaseModel.php @@ -37,7 +37,7 @@ abstract public function save(): self; protected function checkAllowEdit(): void { - if (method_exists($this, 'allowDelete')) { + if (method_exists($this, 'allowEdit')) { if (!$this->allowEdit()) { throw new EditOperationNotAllowedException(); }