I've written a component for Joomla 2.5. It works great. However I'm having access control issues. The component manages documents. It allows clients to upload them, tag them, search etc. All this works fine. The user needs to be looged in to the system to be able to view, edit and delete documents.
Unfortunately whilst the system restricts editing and deleting it doesn't seem to restrict viewing. It doesn't restrict the view to logged in users only. If you type the component url for a document directly into the browser bar it loads up the view:
http://www.mydomain.com/component/document_managment/1.html?view=document
I've searched around and can't find anything that helps. Any ideas about what I might have done wrong?