Skip to Content Skip to Menu

Display of moderation rights

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 249
  • Thanks: 17
  • Karma: 0
3 weeks 4 days ago #341109 by sereniteam
Display of moderation rights was created by sereniteam
Hello,
I'd like to be able to restrict notifications to moderators authorized to validate the opening of accounts. Today it is possible to give rights to users so that they can modify the information of a category of users. On the other hand, the notifications mentioned on their file do not distinguish between requests made by other categories that are not open to them. In other words, the number of notifications is global and forces moderators to find the requests that concern them. 
Today, the solution doesn't allow you to display only the notifications dedicated to you, which confuses our moderators and complicates their task. 
   

SereniTeam

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49260
  • Thanks: 8418
  • Karma: 1462
3 weeks 4 days ago #341111 by krileon
Replied by krileon on topic Display of moderation rights
Registration approval doesn't have different moderation rights or groups. Any CB Moderator can approve a registration.

The only way you'd be able to do that is act on the onBeforePendingApprovalUsersFormDisplay trigger, loop through the $users array in var1, and filter them out based off the viewing user.

That's doable using CB Auto Actions. I can provide a simple example if you'd like, but this would have no impact on the notification still showing 7 pending, but you could replace that with a CB Query Field so you could better control what users it queries for then substitute it in wherever you like.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • sereniteam
  • sereniteam
  • OFFLINE
  • Posts: 249
  • Thanks: 17
  • Karma: 0
3 weeks 4 days ago #341112 by sereniteam
Replied by sereniteam on topic Display of moderation rights
Thanks if you can send me samples
Will be great
Vincent

SereniTeam

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49260
  • Thanks: 8418
  • Karma: 1462
3 weeks 4 days ago #341115 by krileon
Replied by krileon on topic Display of moderation rights
The below should work for filtering that list to specific users.

Global
Triggers: onBeforePendingApprovalUsersFormDisplay
Type: Code
User: Self
Access: Everybody
Action
Method: PHP
Code:
Code:
foreach ( $variables['var1] as $i => $pendingUser ) { $denied = cbCheckIfUserCanPerformUserTask( $pendingUser->getInt( 'id', 0 ), 'allowModeratorsUserEdit' ); if ( $denied === null ) { $denied = checkCBpermissions( [ $pendingUser->getInt( 'id', 0 ) ] ), 'edit', true ); } if ( $denied ) { unset( $variables['var1][$i] ); } }
Parameters
Reference Variables: Variable 1

It should apply the same permissions checking as profile edit to handle who to filter out. Note the above was not tested and is just an example, but should work.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum