mirror of
https://github.com/flarum/framework.git
synced 2024-11-24 23:29:09 +08:00
parent
cde8dd0dc4
commit
4b3e1b16d9
|
@ -84,10 +84,10 @@ export default class PermissionGrid extends Component {
|
|||
viewItems() {
|
||||
const items = new ItemList();
|
||||
|
||||
items.add('view', {
|
||||
items.add('viewDiscussions', {
|
||||
icon: 'eye',
|
||||
label: app.trans('core.admin.permissions_view_discussions_label'),
|
||||
permission: 'forum.view',
|
||||
permission: 'viewDiscussions',
|
||||
allowGuest: true
|
||||
}, 100);
|
||||
|
||||
|
@ -112,7 +112,7 @@ export default class PermissionGrid extends Component {
|
|||
items.add('start', {
|
||||
icon: 'edit',
|
||||
label: app.trans('core.admin.permissions_start_discussions_label'),
|
||||
permission: 'forum.startDiscussion'
|
||||
permission: 'startDiscussion'
|
||||
}, 100);
|
||||
|
||||
items.add('allowRenaming', {
|
||||
|
|
|
@ -76,7 +76,6 @@ class ForumSerializer extends AbstractSerializer
|
|||
'allowSignUp' => (bool) $this->settings->get('allow_sign_up'),
|
||||
'defaultRoute' => $this->settings->get('default_route'),
|
||||
'canViewDiscussions' => $gate->allows('viewDiscussions'),
|
||||
'canViewUserList' => $gate->allows('viewUserList'),
|
||||
'canStartDiscussion' => $gate->allows('startDiscussion')
|
||||
];
|
||||
|
||||
|
|
|
@ -274,10 +274,10 @@ class InstallCommand extends AbstractCommand
|
|||
{
|
||||
$permissions = [
|
||||
// Guests can view the forum
|
||||
[2, 'forum.view'],
|
||||
[2, 'viewDiscussions'],
|
||||
|
||||
// Members can create and reply to discussions
|
||||
[3, 'forum.startDiscussion'],
|
||||
[3, 'startDiscussion'],
|
||||
[3, 'discussion.reply'],
|
||||
|
||||
// Moderators can edit + delete stuff
|
||||
|
|
Loading…
Reference in New Issue
Block a user