Moderators assigned to specific users

6 years 3 months ago #300924 by sirweb
About moderating users, referring to this post:
www.joomlapolis.com/forum/153-professional-member-support/231071-proper-acl-for-cb-moderators
specifically "We eventually want to have moderator assignment so moderators can be assigned to specific users. "

What is the progress in this matter?

An example of implementation could be a school where the class teacher should have access to edit his class students.

Meanwhile, I am thinking of a sneak solution for frontend moderation (read profile updates) of users using Auto Actions.
If there isn´t a better solution I haven´t noticed?

Using a trigger onBeforeUserProfileEditDisplay or onBeforeUserProfileEditReuquest (unsure which one)
to make a check of the user and the moderator belongs to the same user group or has the same value on a specific CB field.
If the condition is true, open for editing, if false throw a popup notification saying "You are not authorised to edit this user".
Thinking of a PHP script for this action.

Do you see any obstacles to do this?
Or, if there already is a better solution... :)

Thanks.

Please Log in to join the conversation.

6 years 3 months ago - 6 years 3 months ago #300938 by krileon
Replied by krileon on topic Moderators assigned to specific users
We do not have a feature to assign a moderator to a specific user. It's something we will be reviewing for implementation in a later release (probably CB 3.0 or even later).

Do you see any obstacles to do this?

Nope, should work fine. I'd just use a redirect action and send them back to that users profile with a message if they're not authorized to edit them via your condition.

Depending on how many classes you have you maybe able to do something like the below usergroup structure.

Registered
- Class 1
- - Class 1 Teacher
- Class 2
- - Class 2 Teacher
- Class 3
- - Class 3 Teacher

Next create a view access level with Class 1-3 Teacher selected and set that to your moderator view access level then see if that prevents Teacher 3 from editing Class 1 students. The students should have usergroup Class 1, Class 2, and/or Class 3. Make sure Registered is removed from them.


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.
The following user(s) said Thank You: sirweb

Please Log in to join the conversation.

6 years 3 months ago #300951 by sirweb
Replied by sirweb on topic Moderators assigned to specific users
Thank you! :)

A follow-up question, does Ajax in frontend edit use any triggers, ie the 2 i mentioned above?

Thanks again.

Please Log in to join the conversation.

6 years 3 months ago #300968 by krileon
Replied by krileon on topic Moderators assigned to specific users
No, the two triggers you mentioned are only fired if profile edit is directly viewed. CB Core Fields Ajax does fire onBeforeUserUpdate and onAfterUserUpdate triggers when a field is changed. It's also template driven so additional checks can be added directly to the template files to block the ajax edit output.


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.
The following user(s) said Thank You: sirweb

Please Log in to join the conversation.

6 years 3 months ago #301047 by sirweb
Replied by sirweb on topic Moderators assigned to specific users
Thanks!

I´d like to extend this issue a little.
We used to let Profile Update Logger to notify when a user profile is updated.

In this distributred moderation, that doesn´t make sense, as we want to notify student and teacher about updates.
Creating a condition to select whom to send to is easy.
But is it possible in a simple way to email profile change3s in the same manner as PU Logger does?

Please Log in to join the conversation.

6 years 3 months ago #301058 by krileon
Replied by krileon on topic Moderators assigned to specific users

But is it possible in a simple way to email profile change3s in the same manner as PU Logger does?

No, CB Profile Update Logger checks 1 by 1 if a fields value has changed. That's doable in CB Auto Actions, but CB Auto Actions conditions do not support OR case at this time so it's not possible to send an email if say 1 of 20 fields change values. There is no trigger in CB Profile Update Logger for when the notification is sent so it won't be possible to override or extend that behavior. Probably easiest approach is to just add a parameter to CB Profile Update Logger to send notification to user self in addition to moderators, etc..

forge.joomlapolis.com/issues/6980


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.
The following user(s) said Thank You: sirweb

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.182 seconds

Facebook Twitter LinkedIn