Question regarding the canEditPost function


Well-known member
In my add-on called Rotate, I have created a route called 'rotate' and I use it in a template like this:

I would like to allow the Registered user group to be able to rotate attachments, but only when they have edit permission for a particular post, otherwise I will throw an error if there is no permission. My question is there an easy way to see if a post can still be edited by a user by using an existing XenForo function?


class Andy_Rotate_ControllerPublic_Rotate extends XenForo_ControllerPublic_Abstract
    public function actionIndex()
        (add code here)
Thank you.

Thank you.

Chris D

XenForo developer
Staff member
Just call the "canEditPost" function from the Post model - you've already mentioned it in the title of your thread.