Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Director::set_environment_type(); no longer blocking visitors

Go to End

3 Posts   3170 Views


Community Member, 116 Posts

20 April 2009 at 11:48am

From what I recall - if you set Director::set_environment_type('') to 'test' - only logged in users should be able to view the front end of the site. Visitors that are not logged in are prompted with a box asking them to log in.

Has this functionality been taken out of the recent release?



Forum Moderator, 801 Posts

26 April 2009 at 9:45pm

Yes, please have a look at our upgrading notes:

BasicAuth disabled on test sites by default
Basic auth isn’t enabled by default on test sites. If you need this, put this in your _config.php
if(Director::isTest()) BasicAuth::enable();


Community Member, 108 Posts

1 May 2009 at 10:52pm

Does this also apply to forms?

I have a registration form that I need to send users to when they request to Create new user account. The form works, however I can only get to it if I'm logged in. Defeats the purpose of having the registration form.

I set the Access level for the form to Anyone can view it.

What do you think?