﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
14602,"Create user_can, refactor current_user_can, author_can, current_user_can_for_blog",simonwheatley,,"Currently we have no function to pass a user ID and a capability/rolewhich will return whether the user can perform that role or has that capability. Further, the functions {{{current_user_can}}}, {{{author_can}}}, and {{{current_user_can_for_blog}}} have some code duplication.

I suggest adding a new function {{{user_can}}}, which accepts any user_ID or a user object and a capability, and returns a boolean. The other {{{*_can*}}} functions can then be refactored to use the new function.

See attached patch.",enhancement,closed,normal,3.1,Role/Capability,3.0.1,normal,fixed,has-patch needs-testing,
