framework/extensions/lock/extend.php
Toby Zerner ac6d9418e1 Remove obsolete permission logic
flarum/core#1513 changes the post.edit permission so that it is only
granted if the user also has permission to reply to the discussion. This
means that explicitly revoking the edit permission is no longer
necessary, as it will never be granted in the first place.
2018-09-22 12:19:07 +09:30

34 lines
933 B
PHP

<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Extend;
use Flarum\Lock\Access;
use Flarum\Lock\Listener;
use Illuminate\Contracts\Events\Dispatcher;
return [
(new Extend\Frontend('forum'))
->js(__DIR__.'/js/dist/forum.js')
->css(__DIR__.'/less/forum.less'),
(new Extend\Frontend('admin'))
->js(__DIR__.'/js/dist/admin.js'),
function (Dispatcher $events) {
$events->subscribe(Listener\AddDiscussionLockedAttributes::class);
$events->subscribe(Listener\AddLockedGambit::class);
$events->subscribe(Listener\CreatePostWhenDiscussionIsLocked::class);
$events->subscribe(Listener\SaveLockedToDatabase::class);
$events->subscribe(Access\DiscussionPolicy::class);
},
];