mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 15:09:40 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
816d2f99cc
|
@ -111,17 +111,17 @@ class SettingsController extends Controller
|
||||||
$start_settings['prod'] = true;
|
$start_settings['prod'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$start_settings['owner'] = '';
|
||||||
|
|
||||||
if (function_exists('posix_getpwuid')) { // Probably Linux
|
if (function_exists('posix_getpwuid')) { // Probably Linux
|
||||||
$owner = posix_getpwuid(fileowner($_SERVER['SCRIPT_FILENAME']));
|
$owner = posix_getpwuid(fileowner($_SERVER['SCRIPT_FILENAME']));
|
||||||
$start_settings['owner'] = $owner['name'];
|
// This *should* be an array, but we've seen this return a bool in some chrooted environments
|
||||||
} else { // Windows
|
if (is_array($owner)) {
|
||||||
// TODO: Is there a way of knowing if a windows user has elevated permissions
|
$start_settings['owner'] = $owner['name'];
|
||||||
// This just gets the user name, which likely isn't 'root'
|
}
|
||||||
// $start_settings['owner'] = getenv('USERNAME');
|
|
||||||
$start_settings['owner'] = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (('root' === $start_settings['owner']) || ('0' === $start_settings['owner'])) {
|
if (($start_settings['owner'] === 'root') || ($start_settings['owner'] === '0')) {
|
||||||
$start_settings['owner_is_admin'] = true;
|
$start_settings['owner_is_admin'] = true;
|
||||||
} else {
|
} else {
|
||||||
$start_settings['owner_is_admin'] = false;
|
$start_settings['owner_is_admin'] = false;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1" data-field="company">{{ trans('admin/companies/table.title') }}</th>
|
<th class="col-sm-1" data-field="company.name">{{ trans('admin/companies/table.title') }}</th>
|
||||||
<th class="col-sm-1" data-field="name">{{ trans('admin/accessories/table.title') }}</th>
|
<th class="col-sm-1" data-field="name">{{ trans('admin/accessories/table.title') }}</th>
|
||||||
<th class="col-sm-1" data-field="model_number">{{ trans('general.model_no') }}</th>
|
<th class="col-sm-1" data-field="model_number">{{ trans('general.model_no') }}</th>
|
||||||
<th class="col-sm-1" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
<th class="col-sm-1" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
||||||
|
|
Loading…
Reference in a new issue