Back to ProBlog Support

anton
anton

As there is no repository, post here. The fix for permissions. Patch:

diff --git a/plugins/radiantweb/problog/Plugin.php b/plugins/radiantweb/problog/Plugin.php
index deb005e..d56048d 100644
--- a/plugins/radiantweb/problog/Plugin.php
+++ b/plugins/radiantweb/problog/Plugin.php
@@ -140,6 +140,13 @@ class Plugin extends PluginBase
             ]
         ];
     }
+
+    public function registerPermissions()
+    {
+        return array(
+            'radiantweb.problog.access_problog_posts' => ['label' => 'Manage blog', 'tab' => 'ProBlog']
+        );
+    }
     public function registerMarkupTags()
     {
diff --git a/plugins/radiantweb/problog/controllers/Categories.php b/plugins/radiantweb/problog/controllers/Categories.php
index ba3ff21..6179361 100644
--- a/plugins/radiantweb/problog/controllers/Categories.php
+++ b/plugins/radiantweb/problog/controllers/Categories.php
@@ -5,6 +5,8 @@ use Backend\Classes\Controller;
 class Categories extends Controller
 {
+    public $requiredPermissions = ['radiantweb.problog.access_problog_posts'];
+
     public $implement = [
         'Backend.Behaviors.FormController',
         'Backend.Behaviors.ListController'
diff --git a/plugins/radiantweb/problog/controllers/Posts.php b/plugins/radiantweb/problog/controllers/Posts.php
index 35f5303..f67b478 100644
--- a/plugins/radiantweb/problog/controllers/Posts.php
+++ b/plugins/radiantweb/problog/controllers/Posts.php
@@ -9,6 +9,8 @@ use Radiantweb\Problog\Models\Settings as ProblogSettingsModel;
 class Posts extends Controller
 {
+    public $requiredPermissions = ['radiantweb.problog.access_problog_posts'];
+
     public $implement = [
         'Backend.Behaviors.FormController',
         'Backend.Behaviors.ListController'
diff --git a/plugins/radiantweb/problog/controllers/Tags.php b/plugins/radiantweb/problog/controllers/Tags.php
index 7bb62c3..a2c1211 100644
--- a/plugins/radiantweb/problog/controllers/Tags.php
+++ b/plugins/radiantweb/problog/controllers/Tags.php
@@ -5,6 +5,8 @@ use Backend\Classes\Controller;
 class Tags extends Controller
 {
+    public $requiredPermissions = ['radiantweb.problog.access_problog_posts'];
+
     public $implement = [
         'Backend.Behaviors.FormController',
         'Backend.Behaviors.ListController'
ChadStrat
ChadStrat

Appreciated. Ty. On my list to add perms. Been tied up with projects.

ChadStrat

ChadStrat
ChadStrat

updated in v1.5.8

1-3 of 3