By default, the document library is public and available to everyone who visits your website.
You can easily restrict access to some of your all documents. For example, you can use Document Library Pro with our Password Protected Categories plugin to restrict access to any or all of your document categories. Restrict a category so that only specific users, roles, or people with the password can see the documents. When people visit your document library pages, they will only see the documents that they have access to.