1
0
mirror of https://github.com/flarum/core.git synced 2025-10-11 23:14:29 +02:00

Policy Extender and Tests (#2461)

Policy application has also been refactored, so that policies return one of `allow`, `deny`, `forceAllow`, `forceDeny`. The result of a set of policies is no longer the first non-null result, but rather the highest priority result (forceDeny > forceAllow > deny > allow, so if a single forceDeny is present, that beats out all other returned results). This removes order in which extensions boot as a factor.
This commit is contained in:
Alexander Skvortsov
2020-12-08 19:10:06 -05:00
committed by GitHub
parent 8901073d12
commit d1dfa758e4
15 changed files with 597 additions and 125 deletions

View File

@@ -51,9 +51,6 @@ class PostServiceProvider extends AbstractServiceProvider
$this->setPostTypes();
$events = $this->app->make('events');
$events->subscribe(PostPolicy::class);
Post::registerVisibilityScoper(new ScopePostVisibility(), 'view');
}