1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-13 21:52:29 +01:00

Implement public interface settings

This commit is contained in:
Chaoyi Zha 2016-02-13 13:38:45 -05:00
parent 99b2d88788
commit a36122a98f
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,11 @@ class IndexController extends Controller {
if (env('POLR_SETUP_RAN') != true) { if (env('POLR_SETUP_RAN') != true) {
return redirect(route('setup')); return redirect(route('setup'));
} }
if (!env('SETTING_PUBLIC_INTERFACE') && !self::isLoggedIn()) {
return redirect()->to(env('SETTING_INDEX_REDIRECT'));
}
return view('index', ['large' => true]); return view('index', ['large' => true]);
} }
} }

View File

@ -60,8 +60,8 @@ Setup
<p>Show Public Interface:</p> <p>Show Public Interface:</p>
<select name='setting:public_interface' class='form-control'> <select name='setting:public_interface' class='form-control'>
<option value='false' selected='selected'>Show public interface (default)</option> <option value='true' selected='selected'>Show public interface (default)</option>
<option value='true'>Hide public interface (for private shorteners)</option> <option value='false'>Hide public interface (for private shorteners)</option>
</select> </select>
<p>If public interface is hidden, redirect index page to:</p> <p>If public interface is hidden, redirect index page to:</p>