Added permission check when listing all posts