I think the post edit link should be visible to post author and moderator(editor user or how have that capability)
So my proposed code is like this
global $post, $current_user;$post;
get_currentuserinfo$current_user = wp_get_current_user();
if(current_user_can( 'edit_others_posts', $post->ID ) ||&& ($post->post_author == $current_user->ID)) {
//show edit link
}