Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum wpForo Support Forum

Some other roles can moderate whereas it should not be possible

Page 2 / 2

eric welment
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 2 months ago

Ok. Can you please provide a snippet so that moderation is linked to admin+editor roles and not to a specific capability.

Thanks in advance

Reply
1 Reply
Astghik
Admin
(@astgh)
Joined: 4 years ago

Support Team
Posts: 5007

@eric-welment,

Please deactivate the plugin and check again. If the issue is caused by the plugin just contact the plugin support and ask them to solve the issue. 

Reply
eric welment
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 2 months ago

the problem is not the plugin, the problem is your plugin moderation is linked to a capability shared by several roles, it is not linked to roles. Can you tell me the capability you use ?

Reply
1 Reply
Astghik
Admin
(@astgh)
Joined: 4 years ago

Support Team
Posts: 5007

Hi, sure, here are those:

  • moderate_comments
  • edit_comment
Reply
eric welment
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 2 months ago

Hi, I am sorry but I removed these capabilities but "inscrits" can still moderate comments

I put this in functions.php (child theme)

// remove inscrits capabilities

function remove_inscrits_moderate_comments(){
global $wp_roles;
$wp_roles->remove_cap( 'inscrits', 'moderate_comments' );
}

function remove_inscrits_edit_comment(){
global $wp_roles;
$wp_roles->remove_cap( 'inscrits', 'edit_comment' );
}

Can you please help solve this issue.

Regards

Eric

Reply
1 Reply
Astghik
Admin
(@astgh)
Joined: 4 years ago

Support Team
Posts: 5007

@eric-welment,

Have you called those functions before the wpDiscuz functions are being called?  

Reply
eric welment
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 2 months ago

I put them in my functions.php

Reply
1 Reply
Astghik
Admin
(@astgh)
Joined: 4 years ago

Support Team
Posts: 5007

It's not enough to add the functions. You should also call the functions you've added while the WordPress init hook is working. More info here: https://developer.wordpress.org/reference/hooks/init/

Reply
eric welment
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 2 months ago

Ok, I will try that and see how it goes

Anyway I found a fix : I edited the php file to modify capabilities conditions to 'moderate_comments AND edit_comment' instead of OR

Best regards

Reply
Page 2 / 2
Share:
Scroll to top