Add default permissions

This commit is contained in:
Toby Zerner 2017-07-22 12:22:03 +09:30
parent 5839d6201d
commit e5bdcce36d
2 changed files with 20 additions and 1 deletions

View File

@ -15,7 +15,7 @@
"source": "https://github.com/flarum/flarum-ext-approval"
},
"require": {
"flarum/core": "^0.1.0-beta.6",
"flarum/core": "^0.1.0-beta.7",
"flarum/flarum-ext-flags": "^0.1.0-beta.6"
},
"autoload": {

View File

@ -0,0 +1,19 @@
<?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\Core\Group;
use Flarum\Database\Migration;
return Migration::addPermissions([
'discussion.startWithoutApproval' => Group::MEMBER_ID,
'discussion.replyWithoutApproval' => Group::MEMBER_ID,
'discussion.approvePosts' => Group::MODERATOR_ID
]);