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:
committed by
GitHub
parent
8901073d12
commit
d1dfa758e4
@@ -51,9 +51,6 @@ class PostServiceProvider extends AbstractServiceProvider
|
||||
|
||||
$this->setPostTypes();
|
||||
|
||||
$events = $this->app->make('events');
|
||||
$events->subscribe(PostPolicy::class);
|
||||
|
||||
Post::registerVisibilityScoper(new ScopePostVisibility(), 'view');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user