Fixed #3416 - bulk delete asset models

This commit is contained in:
snipe
2017-12-12 09:10:05 -08:00
parent 1d82f80e73
commit 608bb1b5b1
9 changed files with 196 additions and 21 deletions

View File

@@ -2,14 +2,14 @@
(PHP_SAPI !== 'cli' || isset($_SERVER['HTTP_USER_AGENT'])) && die('Access denied.');
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
echo "Skipping user check as it is not supported on Windows\n";
echo "Skipping user check as it is not supported on Windows\n";
} else {
$pwu_data = posix_getpwuid(posix_geteuid());
$username = $pwu_data['name'];
$pwu_data = posix_getpwuid(posix_geteuid());
$username = $pwu_data['name'];
if (($username=='root') || ($username=='admin')) {
die("\nERROR: This script should not be run as root/admin. Exiting.\n\n");
}
if (($username=='root') || ($username=='admin')) {
die("\nERROR: This script should not be run as root/admin. Exiting.\n\n");
}
}
@@ -164,3 +164,4 @@ echo "your upgraded Snipe-IT.\n";
echo "--------------------------------------------------------\n\n";