Change WordPress user roles and capabilities › Forums › Restrict or Permit access inside WordPress – how to › Restrict editing pages by user role? › Reply To: Restrict editing pages by user role?
Code you showed is incomplete and invalid. It lost the begin of restrict_posts_list() function. Please re-check, what you added to the functions.php