Skip to content

Commit

Permalink
Fixed issue that the allowDelete function was called when `allowEdi…
Browse files Browse the repository at this point in the history
…t` should have been called
  • Loading branch information
MasterZydra committed Feb 26, 2024
1 parent e902e15 commit 273a12b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion framework/Database/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 273a12b

Please sign in to comment.