Referring to the Codex entry for this, I suggest using another hook. They use the ‘admin_init’ action:
function add_theme_caps() {
$role = get_role( 'author' ); // gets the author role
$role->add_cap( 'edit_others_posts' ); // would allow the author to edit others' posts for current theme only
}
add_action( 'admin_init', 'add_theme_caps');