WIP: Road to 1.0.0 #1
|
@ -31,13 +31,14 @@ class Options
|
||||||
{
|
{
|
||||||
$value = Cache::get($option);
|
$value = Cache::get($option);
|
||||||
|
|
||||||
|
|
||||||
if (is_null($value)) {
|
if (is_null($value)) {
|
||||||
Log::debug('Option '.$option.'not found in cache, refreshing from database');
|
Log::debug('Option '.$option.'not found in cache, refreshing from database');
|
||||||
$value = Option::where('option_name', $option)->first();
|
$value = Option::where('option_name', $option)->first();
|
||||||
if (is_null($value)) {
|
if (is_null($value)) {
|
||||||
throw new \Exception('This option does not exist.');
|
throw new \Exception('This option does not exist.');
|
||||||
}
|
}
|
||||||
Cache::put($option, $value);
|
Cache::put($option, $value->option_value);
|
||||||
Cache::put($option.'_desc', 'Undefined description');
|
Cache::put($option.'_desc', 'Undefined description');
|
||||||
|
|
||||||
return $value->option_value;
|
return $value->option_value;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||||
<i class="fas fa-info-circle"></i> <b>Available security policies</b>
|
<i class="fas fa-info-circle"></i> <b>Available security policies</b> (current policy: {{ $security['secPolicy'] }})
|
||||||
|
|
||||||
<p><b>Disabled:</b> No security policy will be enforced. This is insecure.</p>
|
<p><b>Disabled:</b> No security policy will be enforced. This is insecure.</p>
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="pwExpiry">Password Expiry Control</label>
|
<label for="pwExpiry">Password Expiry Control</label>
|
||||||
<input type="text" class="form-control" id="pwExpiry" placeholder="time in days" name="pwExpiry" value="{{ $security['pwExpiry'] }}">
|
<input type="text" class="form-control" id="pwExpiry" placeholder="time in days" name="pwExpiry" value="{{ $security['pwExpiry'] }}">
|
||||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> Leave this field blank to disable. Users will be forced to reset their password after the specified time.</p>
|
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> Leave this field zeroed to disable. Users will be forced to reset their password after the specified time.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue