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.

Data Model Questions

Director::set_environment_type(); no longer blocking visitors


Reply

3 Posts   2273 Views

Avatar
novaweb

20 April 2009 at 11:48am Community Member, 115 Posts

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?

Cheers

Avatar
Ingo

26 April 2009 at 9:45pm Forum Moderator, 801 Posts

Yes, please have a look at our upgrading notes: http://doc.silverstripe.com/doku.php?id=upgrading:2.3.0

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();

Avatar
TerryMiddleton

1 May 2009 at 10:52pm Community Member, 108 Posts

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?

Terry