fix permissions bug in mailman plugin

parent 069f23ad
...@@ -133,8 +133,8 @@ if(!class_exists('Mailman_Integration_Settings')) ...@@ -133,8 +133,8 @@ if(!class_exists('Mailman_Integration_Settings'))
'mailman.php', 'mailman.php',
'Mailman moderation queue', 'Mailman moderation queue',
'Moderation queues', 'Moderation queues',
'manage_options',
'publish_posts', 'publish_posts',
'mailman_queue',
array(&$this, 'plugin_settings_page_check_queue') array(&$this, 'plugin_settings_page_check_queue')
); );
...@@ -142,8 +142,8 @@ if(!class_exists('Mailman_Integration_Settings')) ...@@ -142,8 +142,8 @@ if(!class_exists('Mailman_Integration_Settings'))
'mailman.php', 'mailman.php',
'Mailman list settings', 'Mailman list settings',
'Settings', 'Settings',
'publish_posts', 'manage_options',
'mailman_lists', 'mailman_settings',
array(&$this, 'plugin_settings_page_check') array(&$this, 'plugin_settings_page_check')
); );
} }
...@@ -163,7 +163,7 @@ if(!class_exists('Mailman_Integration_Settings')) ...@@ -163,7 +163,7 @@ if(!class_exists('Mailman_Integration_Settings'))
} }
public function plugin_settings_page_check_lists() public function plugin_settings_page_check_lists()
{ {
if(!current_user_can('manage_options')) if(!current_user_can('publish_posts'))
{ {
wp_die(__('You do not have sufficient permissions to access this page.')); wp_die(__('You do not have sufficient permissions to access this page.'));
} }
...@@ -173,7 +173,7 @@ if(!class_exists('Mailman_Integration_Settings')) ...@@ -173,7 +173,7 @@ if(!class_exists('Mailman_Integration_Settings'))
} }
public function plugin_settings_page_check_queue() public function plugin_settings_page_check_queue()
{ {
if(!current_user_can('manage_options')) if(!current_user_can('publish_posts'))
{ {
wp_die(__('You do not have sufficient permissions to access this page.')); wp_die(__('You do not have sufficient permissions to access this page.'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment