Offer opt in to usage and error reporting during install (#13906)

and on the about page
This commit is contained in:
Tony Murray
2022-12-15 19:52:22 -06:00
committed by GitHub
parent 510f9d340d
commit 8ea3f5cd06
19 changed files with 336 additions and 192 deletions

View File

@@ -1,21 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (! Auth::user()->hasGlobalAdmin()) {
exit('ERROR: You need to be admin');
}
\App\Models\Callback::set('enabled', '2');

View File

@@ -1,21 +0,0 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
header('Content-type: text/plain');
if (! Auth::user()->hasGlobalAdmin()) {
exit('ERROR: You need to be admin');
}
\App\Models\Callback::set('enabled', (int) ($_POST['state'] == 'true'));