[wp-trac] Re: [WordPress Trac] #4802: Author can moderate comments on their own posts

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 24 13:01:00 GMT 2007

#4802: Author can moderate comments on their own posts
 Reporter:  alakhnor        |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  normal          |    Milestone:  2.2.3    
Component:  Administration  |      Version:  2.2.2    
 Severity:  normal          |   Resolution:           
 Keywords:                  |  
Comment (by intoxination):

 Currently there is a moderate_comments capability, but that looks like it
 is more used for spam/Akismet than anything else.

 My suggestion is to change the edit_posts capability to moderate_comments
 capability on any section that involves comments (ie: editing, deleting,
 editing, approve/unapprove, etc).

 To not break anything, we could keep it so that the post id is still
 checked (as it is with edit_posts) so people can only edit comments on
 their own post. This would allow a simple plugin to over ride the post
 check on the user_has_cap filter.

 Another possibility would be to use the current moderate_comments
 capability and add a moderate_all_comments capability. Moderate_comments
 would work on the same post->ID check as edit_posts do now.
 Moderate_all_comments would just override that check and return true.

 (As it is currently, you really can't do a filter on user_has_cap to
 achieve this, since you have no way of knowing what function that
 user_has_cap is checking against)

 Since the moderate_comments capability is already included in the 160
 schema, we could just then do another small upgrade that loops through all
 roles and if that role has the edit_posts capability, we add the
 moderate_comments capability.

 This would then provide sites with a mechanism to further divide up the
 work load involved in managing a site. You could have a person that just
 has the moderate_comments (or moderate_all_comments) capability that would
 have access to only the comment screen from backstage (as well as edit
 links when viewing comments). You could also have author's that the
 capability has been taken away from that don't see the comment screen or
 edit links.

 This is a rather common scenario for larger/community based sites. They
 may allow certain people to post articles as contributors or authors, but
 want to have a group of moderators that can police the comments for them.
 Instead of granting those moderators the almost holy editor access (or
 full holy administrator access), they would just need a moderator access.
 Of course they can also deny the moderate_comments capability from authors
 so that only the moderators can edit comments.

 Basically the way I see it is posts != comments and the capabilities for
 both need to be split off.

Ticket URL: <http://trac.wordpress.org/ticket/4802#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list