From 47bf958448d0430c2a333c3f77caaff42ea65491 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 29 Nov 2016 05:29:35 +0000 Subject: [PATCH 1/3] Apply fixes from StyleCI [ci skip] [skip ci] --- .../2015_09_21_011527_add_is_approved_to_discussions.php | 1 + .../migrations/2015_09_21_011706_add_is_approved_to_posts.php | 1 + extensions/approval/src/Access/TagPolicy.php | 1 + extensions/approval/src/Event/PostWasApproved.php | 1 + extensions/approval/src/Listener/AddClientAssets.php | 1 + extensions/approval/src/Listener/AddPostApprovalAttributes.php | 1 + extensions/approval/src/Listener/ApproveContent.php | 1 + extensions/approval/src/Listener/HideUnapprovedContent.php | 1 + extensions/approval/src/Listener/UnapproveNewContent.php | 1 + 9 files changed, 9 insertions(+) diff --git a/extensions/approval/migrations/2015_09_21_011527_add_is_approved_to_discussions.php b/extensions/approval/migrations/2015_09_21_011527_add_is_approved_to_discussions.php index c57bb42d3..43eb083b7 100644 --- a/extensions/approval/migrations/2015_09_21_011527_add_is_approved_to_discussions.php +++ b/extensions/approval/migrations/2015_09_21_011527_add_is_approved_to_discussions.php @@ -1,4 +1,5 @@ Date: Sun, 1 Jan 2017 22:44:22 +0100 Subject: [PATCH 2/3] Update year --- extensions/approval/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/approval/LICENSE b/extensions/approval/LICENSE index a502a8545..1e346ea06 100644 --- a/extensions/approval/LICENSE +++ b/extensions/approval/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016 Toby Zerner +Copyright (c) 2014-2017 Toby Zerner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From e5bdcce36da68a9c55826112ee7493259eb78361 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 22 Jul 2017 12:22:03 +0930 Subject: [PATCH 3/3] Add default permissions --- extensions/approval/composer.json | 2 +- ...7_07_22_000000_add_default_permissions.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 extensions/approval/migrations/2017_07_22_000000_add_default_permissions.php diff --git a/extensions/approval/composer.json b/extensions/approval/composer.json index 6acefd181..ae8410422 100644 --- a/extensions/approval/composer.json +++ b/extensions/approval/composer.json @@ -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": { diff --git a/extensions/approval/migrations/2017_07_22_000000_add_default_permissions.php b/extensions/approval/migrations/2017_07_22_000000_add_default_permissions.php new file mode 100644 index 000000000..9e364d89b --- /dev/null +++ b/extensions/approval/migrations/2017_07_22_000000_add_default_permissions.php @@ -0,0 +1,19 @@ + + * + * 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 +]);