allowcomments not respected properly

Bug #1095890 reported by Hugh Davenport
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
High
Unassigned

Bug Description

Not sure why, but the function user_comments_allowed (lib/view.php line 3872), seems to check through all the access rights for the "allowcomment" flag, which doesn't seem to be configurable from the web interface. If the page has allowcomments off, and one of the access rights allows comments, then comments are allowed.

The particular access right i found it on was an "objectionable" type.

Son Nguyen (ngson2000)
Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
status: Triaged → In Progress
Revision history for this message
Son Nguyen (ngson2000) wrote :

There are two options the function user_comments_allowed() needs to check: allowcomments and approvecomments.

if allowcomments of one access right is true, the user can put comments and if approvecomments of one access right is FALSE given the allowcomments is TRUE then the user can publish his/her comment without the approval of the owner.

I think the function user_comments_allowed() is correct as it needs to check though all access rights for both "allowcomment" and "approvecomment" flags

Changed in mahara:
status: In Progress → Invalid
Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

Hi Son,

The issue with this is that you can't actually configure the "allowcomment" flag of any access rights, in the web interface it appears as just a overall view setting.

I think either the for loop needs to cover the "objectionable" access type which doesn't show up anywhere in the access interface, and treat that differently.

Cheers,

Hugh

Son Nguyen (ngson2000)
Changed in mahara:
assignee: Son Nguyen (ngson2000) → nobody
Aaron Wells (u-aaronw)
Changed in mahara:
status: Invalid → Triaged
milestone: 1.7.0 → 1.8.0
Son Nguyen (ngson2000)
Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
Aaron Wells (u-aaronw)
Changed in mahara:
milestone: 1.8.0rc1 → none
assignee: Son Nguyen (ngson2000) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.