Skip to content

Commit

Permalink
Authenticator::checkAccess wouldn't use the logged in user if it wa…
Browse files Browse the repository at this point in the history
…sn't loaded before
  • Loading branch information
lcharette committed Sep 27, 2024
1 parent b84a465 commit c322151
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [5.1.5](https://github.com/userfrosting/sprinkle-account/compare/5.1.4...5.1.5)
- `Authenticator::checkAccess` wouldn't use the logged in user if it wasn't loaded before

## [5.1.4](https://github.com/userfrosting/sprinkle-account/compare/5.1.3...5.1.4)
- Update SiteLocale for sprinkle-core 5.1.3
- User field `deleted_at` can be null if the user has not been deleted

## [5.1.3](https://github.com/userfrosting/sprinkle-account/compare/5.1.2...5.1.3)
- Fix another SQL issue when working with extending the User model with an auxiliary table.

Expand Down
2 changes: 1 addition & 1 deletion app/src/Authenticate/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function flushSessionCache(string $id): bool
*/
public function checkAccess(string $slug, array $params = []): bool
{
return $this->authorizationManager->checkAccess($this->user, $slug, $params);
return $this->authorizationManager->checkAccess($this->user(), $slug, $params);
}

/**
Expand Down

0 comments on commit c322151

Please sign in to comment.