Commenting form is showing to all users if there is no comments posted
----------------------------------------------------------------------

                 Key: MGNLCMNT-57
                 URL: http://jira.magnolia-cms.com/browse/MGNLCMNT-57
             Project: Magnolia Commenting Module
          Issue Type: Bug
      Security Level: Public
    Affects Versions: 1.1.4, 1.1.3
            Reporter: Zarko Ivanoski
            Assignee: Jan Haderka
            Priority: Major


Commenting form should not be shown to users that has no rights to post 
comments. In PageComments class there is method "isAllowedToPost" that check is 
user has right to post. But in case where there are no comments posted, it 
returns true value so form will be shown to all users.


public boolean isAllowedToPost() {
        if (getThread() == null) {
            // thread doesn't exist yet as no one commented here before
            return true;
        } else {
            return super.isAllowedToPost();
        }
}


Maybe this feature is planned to restrict posting comments to some of users by 
checking user rights to post on specific comments thread but in that case maybe 
there is need of another method that will be used in comments.inc.ftl only for 
showing the form.

If that is not the idea, this method should only check user rights for all 
comments thread in forum.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to