I'm developing a site with Git and Master Config, and up until yesterday I was forcing users to log-in to view the site on the development server with this code in my document head template:
{if logged_out}
{redirect='tmp/login'}
{/if}
But now the site has been launched to production, I have to remove that code and template group. But since everything is synced up using Git, the development environment won't be password protected either.
I'd prefer to use EE's built-in login system over say a .htpasswd file if possible. I figure I can .gitignore the tmp
template group so it only exists on development. Is there a Master Config variable I can use to only parse the logged_out
conditional in the development environment? Like:
{if ENV == 'dev'}
{if logged_out}
{redirect='tmp/login'}
{/if}
{/if}