Remove forum. prefix from permissions

closes #425
This commit is contained in:
Toby Zerner 2015-10-14 16:11:00 +10:30
parent cde8dd0dc4
commit 4b3e1b16d9
3 changed files with 5 additions and 6 deletions

View File

@ -84,10 +84,10 @@ export default class PermissionGrid extends Component {
viewItems() { viewItems() {
const items = new ItemList(); const items = new ItemList();
items.add('view', { items.add('viewDiscussions', {
icon: 'eye', icon: 'eye',
label: app.trans('core.admin.permissions_view_discussions_label'), label: app.trans('core.admin.permissions_view_discussions_label'),
permission: 'forum.view', permission: 'viewDiscussions',
allowGuest: true allowGuest: true
}, 100); }, 100);
@ -112,7 +112,7 @@ export default class PermissionGrid extends Component {
items.add('start', { items.add('start', {
icon: 'edit', icon: 'edit',
label: app.trans('core.admin.permissions_start_discussions_label'), label: app.trans('core.admin.permissions_start_discussions_label'),
permission: 'forum.startDiscussion' permission: 'startDiscussion'
}, 100); }, 100);
items.add('allowRenaming', { items.add('allowRenaming', {

View File

@ -76,7 +76,6 @@ class ForumSerializer extends AbstractSerializer
'allowSignUp' => (bool) $this->settings->get('allow_sign_up'), 'allowSignUp' => (bool) $this->settings->get('allow_sign_up'),
'defaultRoute' => $this->settings->get('default_route'), 'defaultRoute' => $this->settings->get('default_route'),
'canViewDiscussions' => $gate->allows('viewDiscussions'), 'canViewDiscussions' => $gate->allows('viewDiscussions'),
'canViewUserList' => $gate->allows('viewUserList'),
'canStartDiscussion' => $gate->allows('startDiscussion') 'canStartDiscussion' => $gate->allows('startDiscussion')
]; ];

View File

@ -274,10 +274,10 @@ class InstallCommand extends AbstractCommand
{ {
$permissions = [ $permissions = [
// Guests can view the forum // Guests can view the forum
[2, 'forum.view'], [2, 'viewDiscussions'],
// Members can create and reply to discussions // Members can create and reply to discussions
[3, 'forum.startDiscussion'], [3, 'startDiscussion'],
[3, 'discussion.reply'], [3, 'discussion.reply'],
// Moderators can edit + delete stuff // Moderators can edit + delete stuff