diff --git a/src/Core/Support/Locked.php b/src/Core/Support/Locked.php index 4d0cbd8a9..628e59bcb 100644 --- a/src/Core/Support/Locked.php +++ b/src/Core/Support/Locked.php @@ -1,8 +1,6 @@ getConditions($action) as $condition) { $can = $condition($this, $user, $action); @@ -48,7 +46,7 @@ trait Locked * * @throws \Flarum\Core\Exceptions\PermissionDeniedException */ - public function assertCan(User $user, $action) + public function assertCan($user, $action) { if (! $this->can($user, $action)) { throw new PermissionDeniedException; diff --git a/src/Core/Support/VisibleScope.php b/src/Core/Support/VisibleScope.php index cbe1a5b21..a0c5a3d70 100644 --- a/src/Core/Support/VisibleScope.php +++ b/src/Core/Support/VisibleScope.php @@ -1,17 +1,15 @@ scopeVisible as $callback) { - $model::scopeVisible($callback); + $model::addVisiblePostsScope($callback); } foreach ($this->allow as $info) {