1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 05:30:38 +02:00

Move initial permission setup to migrations

Refs #1466.
This commit is contained in:
Franz Liedke
2018-07-16 15:12:16 +02:00
parent dee54a008f
commit c76d9e1298
2 changed files with 30 additions and 30 deletions

View File

@@ -0,0 +1,30 @@
<?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\Database\Migration;
use Flarum\Group\Group;
return Migration::addPermissions([
// Guests can view the forum
'viewDiscussions' => Group::GUEST_ID,
// Members can create and reply to discussions, and view the user list
'startDiscussion' => Group::MEMBER_ID,
'discussion.reply' => Group::MEMBER_ID,
'viewUserList' => Group::MEMBER_ID,
// Moderators can edit + delete stuff
'discussion.hide' => Group::MODERATOR_ID,
'discussion.editPosts' => Group::MODERATOR_ID,
'discussion.hidePosts' => Group::MODERATOR_ID,
'discussion.rename' => Group::MODERATOR_ID,
'discussion.viewIpsPosts' => Group::MODERATOR_ID,
]);