mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Disallow saving data if app is locked
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
1ef4ea6381
commit
3612526632
|
@ -1062,9 +1062,8 @@ class SettingsController extends Controller
|
|||
*/
|
||||
public function postGoogleLoginSettings(Request $request)
|
||||
{
|
||||
if (!$setting = Setting::getSettings()) {
|
||||
return redirect()->to('admin')->with('error', trans('admin/settings/message.update.error'));
|
||||
}
|
||||
if (!config('app.lock_passwords')) {
|
||||
$setting = Setting::getSettings();
|
||||
|
||||
$setting->google_login = $request->input('google_login', 0);
|
||||
$setting->google_client_id = $request->input('google_client_id');
|
||||
|
@ -1078,6 +1077,9 @@ class SettingsController extends Controller
|
|||
return redirect()->back()->withInput()->withErrors($setting->getErrors());
|
||||
}
|
||||
|
||||
return redirect()->back()->with('error', trans('general.feature_disabled'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the listing of backups.
|
||||
|
|
Loading…
Reference in a new issue