1
0
mirror of https://github.com/flarum/core.git synced 2025-08-24 09:03:05 +02:00

Disable "start discussion" button if no permission

This commit is contained in:
Toby Zerner
2015-08-05 16:06:25 +09:30
parent 8be5d5af0f
commit 57e37e06ef
3 changed files with 10 additions and 4 deletions

View File

@@ -28,7 +28,8 @@ class ForumSerializer extends Serializer
'apiUrl' => Core::config('api_url'),
'welcomeTitle' => Core::config('welcome_title'),
'welcomeMessage' => Core::config('welcome_message'),
'themePrimaryColor' => Core::config('theme_primary_color')
'themePrimaryColor' => Core::config('theme_primary_color'),
'canStartDiscussion' => $forum->can($this->actor, 'startDiscussion')
];
if ($this->actor->isAdmin()) {