The access control features of CFWebstore is one thing that sets it apart. It makes it really easy to create custom membership or wholesale sites where only certain users can access the category and/or content. But this can get a little tedious to add the access key to each and every page, category, product, etc. So is there an easier way to do this if you want to lock the entire site? Actually, there is and it doesn't involve any NT authentication or other server-side settings. We just need to add a little code to tell CFWebstore to look for logged in users and redirect them to a specific page.
Let's say for example that we just want to make sure our users belong to one of our assigned user groups, and if they don't, we'll redirect them to the login page. We've probably customized this page already with the exact text appropriate to the store (possibly mentioning how they get approved for access, etc.) We want to be sure to NOT lock the user area so they can still create an account and register. So here's the code that will accomplish this:
You would probably put this code at the end of the index.cfm page, as it will need to run after the rest of the fusebox core code does. You can tweak this as needed, add additional functions, etc. but this should give you an idea of how to do a very basic locked store.