mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 22:53:37 +08:00
parent
c557bcde28
commit
ba97ad561e
|
@ -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', {
|
||||||
|
|
|
@ -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')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user