Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the gVectors community!

Merry Christmas and Happy Holidays! 🎄

Some other roles can moderate whereas it should not be possible

19 Posts
2 Users
0 Reactions
4,292 Views
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 5 years 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: 8 years ago

Illustrious Member
Posts: 6581

@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
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 5 years 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: 8 years ago

Illustrious Member
Posts: 6581

Hi, sure, here are those:

  • moderate_comments
  • edit_comment

Reply
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 5 years 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: 8 years ago

Illustrious Member
Posts: 6581

@eric-welment,

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


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

I put them in my functions.php


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

Illustrious Member
Posts: 6581

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
Posts: 10
Customer
Topic starter
(@eric-welment)
Member
Joined: 5 years 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