Forum Discussion

sunny_mody's avatar
sunny_mody
Advisor
11 years ago

Insert "Approve/Reject" feature of moderator on Forum Topic Page itself?

Hi,

 

I am looking for some option like is there a way we can put "Approve/Reject" feature which usually appears on Moderation manager on ForumTopicPage?

 

Is it possible to enable from backend?

 

Thanks,

Sunny

1 Reply

  • DougS's avatar
    DougS
    Khoros Oracle
    11 years ago

    There is no admin setting that I'm aware of that will add a button to the ForumTopicPage to do this.  This does seem like something we should support in the core product, so you might want to submit an idea on our Product Idea Board.

     

    Starting in 14.4, we have the following REST API calls to approve and reject messages (I believe the approve call was there before 14.4, but the others were added for 14.4 I think):

     

    • Approve
    • Approve Allowed (used to determine if the caller has rights to approve -- use this to determine whether or not to render your custom approve button)
    • Reject
    • Reject Allowed (used to determine if the caller has rights to reject -- use this to determine whether or not to render your custom reject button)

    You could write a custom component that does this (using an endpoint to process a form submit or ajax action) -- be aware that adding any form submit/ajax action to a page could leave you vulnerable to a Cross Site Request Forgery (CSRF) attack and if you want to make sure that doesn't happen then you should take appropriate steps to make sure you are protected (the utils.numbers and usercache freemarker context objects have some methods that could help with this).  The worst that could happen here if you don't protect against CSRF is that someone could trick someone else into approving or rejecting a message.

     

    -Doug