From 8c55eb4e6e737dba47853cc04a5c112d19f7d7d8 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 22 Jul 2017 12:20:24 +0930 Subject: [PATCH] Add default permissions --- composer.json | 2 +- ...17_07_22_000000_add_default_permissions.php | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 migrations/2017_07_22_000000_add_default_permissions.php diff --git a/composer.json b/composer.json index 5d708bf..68ce99d 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "source": "https://github.com/flarum/flarum-ext-flags" }, "require": { - "flarum/core": "^0.1.0-beta.6" + "flarum/core": "^0.1.0-beta.7" }, "autoload": { "psr-4": { diff --git a/migrations/2017_07_22_000000_add_default_permissions.php b/migrations/2017_07_22_000000_add_default_permissions.php new file mode 100644 index 0000000..b6c44fd --- /dev/null +++ b/migrations/2017_07_22_000000_add_default_permissions.php @@ -0,0 +1,18 @@ + + * + * 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.flagPosts' => Group::MEMBER_ID, + 'discussion.viewFlags' => Group::MODERATOR_ID +]);