Skip to content

Commit

Permalink
Merge pull request #61 from humanmade/backport-60-to-v4-branch
Browse files Browse the repository at this point in the history
[Backport v4-branch] Re-enable require-login by default in non-production environments
  • Loading branch information
roborourke authored Jun 24, 2020
2 parents 565e70c + 6fca071 commit f2cfde8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/require-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

By default, all websites are publicly accessible. In some situations, you may want to require users to be logged in to access the website. This is especially useful when in pre-launch mode.

Environments running in Cloud that are not of type `production` have the `require-login` feature enabled by default.

## Controlling Site Access

Requiring login on individual sites is as easy as unchecking the site's public setting in the Edit Site screen. To access this setting, go to [My Sites > Network Admin > Sites](internal://network-admin/sites.php) and then click the URL for the site you want to edit. From there you check the box for whether the site is public or not under the "Attributes" section.
Expand Down
2 changes: 1 addition & 1 deletion load.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
add_action( 'altis.modules.init', function () {
$default_settings = [
'enabled' => true,
'require-login' => false,
'require-login' => ! in_array( Altis\get_environment_type(), [ 'production', 'local' ], true ),
'php-basic-auth' => false,
'audit-log' => true,
'2-factor-authentication' => true,
Expand Down

0 comments on commit f2cfde8

Please sign in to comment.