You could try this, IF the current user is logged in AND not Adminstrator it will pull all posts from the current user, otherwise it should default and show all posts from all users.
<?php
function filter_posts_by_author( $query ) {
if( is_user_logged_in() ) {
if( !current_user_can( 'administrator' ) ) {
global $current_user;
get_currentuserinfo();
$query->set( 'author', $current_user->ID );
}
}
else {
wp_die('Sorry, you do not have access to this page. Please <a href="/#/">sign in</a> to view this page.');
}
}
add_action( 'pre_get_posts', 'filter_posts_by_author' );
?>