I've developed invoicing system in WordPress for one of my website. I've used custom post type with custom meta field, integrated payment gateway to meet my needs. User generally generate invoice to upload fund. I've used a post submission from in frontend so that user can create an invoice by himself. Everything is running smoothly but one invoice created by an user is visible to other users. Ex. A created invoice, id: APL-2012110489586. User B can access the invoice by typing domin.com?invoice=APL-2012110489586. Now I want to restrict the invoice to be accessed from other user. Only admin and invoice creator can access the invoice. All users are in subscriber role. Need your guideline to perform this job.
In your Loop, whether for a 'single' page or an 'index' page, check the post author against the current user ID, and only display the post if they match. Assuming you are using a typical WordPress Loop, something like...
This also assumes that you are inserting your Custom Post Type entries correctly so that all of the data is populated as it should be.