mirror of
https://github.com/cydrobolt/polr.git
synced 2024-11-12 21:22:28 +01:00
Implement public interface settings
This commit is contained in:
parent
99b2d88788
commit
a36122a98f
@ -13,6 +13,11 @@ class IndexController extends Controller {
|
||||
if (env('POLR_SETUP_RAN') != true) {
|
||||
return redirect(route('setup'));
|
||||
}
|
||||
|
||||
if (!env('SETTING_PUBLIC_INTERFACE') && !self::isLoggedIn()) {
|
||||
return redirect()->to(env('SETTING_INDEX_REDIRECT'));
|
||||
}
|
||||
|
||||
return view('index', ['large' => true]);
|
||||
}
|
||||
}
|
||||
|
@ -60,8 +60,8 @@ Setup
|
||||
|
||||
<p>Show Public Interface:</p>
|
||||
<select name='setting:public_interface' class='form-control'>
|
||||
<option value='false' selected='selected'>Show public interface (default)</option>
|
||||
<option value='true'>Hide public interface (for private shorteners)</option>
|
||||
<option value='true' selected='selected'>Show public interface (default)</option>
|
||||
<option value='false'>Hide public interface (for private shorteners)</option>
|
||||
</select>
|
||||
|
||||
<p>If public interface is hidden, redirect index page to:</p>
|
||||
|
Loading…
Reference in New Issue
Block a user