Compare commits

...

34 Commits

Author SHA1 Message Date
snipe f182ce1c89 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2020-10-23 01:12:54 -07:00
snipe c6dde67e86 Bumped version 2020-10-23 01:12:19 -07:00
snipe c3e8f64064 Merge remote-tracking branch 'origin/develop' 2020-10-22 23:24:56 -07:00
snipe 68cfbaab2e Fixed signature issue on accepted assets - related to #8577
I have no idea how this ever worked? We didn’t rename that fieldname recently.
2020-10-22 23:20:55 -07:00
Brady Wetherington 2abfd8da74 Merge pull request #8568 from uberbrady/fix_wordy_json_ldap_output
Add a dirtiness check to slim down JSON LDAP sync summaries
2020-10-22 21:18:21 -07:00
snipe ec7d70cea0 Merge pull request #8551 from Godmartinz/bug/ch10148/error-when-using-dark-green-skin
fixed the Green skin (dark mode) color scheme on the importer page and asset table
2020-10-22 21:16:52 -07:00
snipe 6c285b0273 Merge pull request #8586 from Godmartinz/Confusing_wording_in_LDAP
reworded the ad_append_domain_help string
2020-10-22 21:15:35 -07:00
snipe e65269e9c7 Merge remote-tracking branch 'origin/develop' 2020-10-22 20:09:16 -07:00
snipe 5d112be49a Fixed #8585 - requested assets page blank 2020-10-22 20:08:33 -07:00
snipe d3f5fde84a Merge remote-tracking branch 'origin/develop' 2020-10-22 19:46:55 -07:00
snipe 496b176d4e Fixed #8589 - unable to accept asset 2020-10-22 19:46:40 -07:00
snipe fd66f7aeb4 Merge remote-tracking branch 'origin/develop' 2020-10-22 19:37:21 -07:00
snipe c71086d2f3 Fixed #8590 - unable to checkin and delete from user view 2020-10-22 19:32:51 -07:00
snipe 153f849ef7 Merge pull request #8581 from fashberg/iss8580
Fixed #8580: ReportsController called method on NULL Object
2020-10-22 13:00:08 -07:00
Godfrey M fcdb945f5f reworded the ad_append_domain_help string 2020-10-22 09:21:18 -07:00
Folke Ashberg 377c92a290 update 2020-10-22 14:33:24 +02:00
Folke Ashberg 5824ac3b28 Fix for #8580
Checking $asset->depreciation before calling $asset->depreciated_date()
2020-10-22 14:22:42 +02:00
Brady Wetherington fad0ed6d5b Add a dirtiness check to slim down JSON LDAP sync summaries 2020-10-21 15:13:36 -07:00
snipe ec9c69323a Merge remote-tracking branch 'origin/develop' 2020-10-21 13:58:58 -07:00
snipe 338106734a Fixed #8562 - manufacturer logo upload failing 2020-10-21 13:57:56 -07:00
snipe 81fcb4c7b3 Merge remote-tracking branch 'origin/develop' 2020-10-21 13:33:04 -07:00
snipe 5ae65d5329 Fixed #8566 - PDF files displaying as ascii instead of downloading 2020-10-21 13:32:46 -07:00
snipe d04b0e4d4b Merge remote-tracking branch 'origin/develop' 2020-10-21 12:23:44 -07:00
snipe a6d0209e93 Fixed #8567 - don’t require model for custom report 2020-10-21 12:23:27 -07:00
snipe 810f6a3970 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2020-10-21 12:03:23 -07:00
snipe 1379821876 Removed accompanying method, since we don’t use it 2020-10-21 12:02:25 -07:00
snipe 33236f16ac Bumped minor version 2020-10-21 12:01:36 -07:00
snipe 90dddee923 Remove the storage moving commands - we don’t use this 2020-10-21 12:00:40 -07:00
snipe 7869ffcc79 Merge pull request #8557 from fashberg/develop
Fixed #8543: Change trustedproxy.php to read env('APP_TRUSTED_PROXIES') again
2020-10-21 11:19:23 -07:00
Folke Ashberg 1687e4b850 Fix for Issue #8543
* trustedproxy.php sets 'proxies' again according to
  env('APP_TRUSTED_PROXIES') again
2020-10-21 10:36:27 +02:00
Godfrey M 4a3d8f2cc0 fixed the Green skin (dark mode) color scheme on the importer page and assets table 2020-10-20 15:22:38 -07:00
snipe c19f1b77b0 Merge pull request #8542 from benwa/patch-2
Fix typo
2020-10-20 10:51:45 -07:00
Bennett Blodinger 132f296f03 Fix typo 2020-10-20 08:13:52 -05:00
snipe 870b097f03 Derp. Should be master 2020-10-19 17:49:56 -07:00
17 changed files with 61 additions and 86 deletions
+16 -10
View File
@@ -191,21 +191,27 @@ class LdapSync extends Command
];
// Only update the database if is not a dry run
if (!$this->dryrun) {
if ($user->save()) {
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
$summary['status'] = 'SUCCESS';
} else {
$errors = '';
foreach ($user->getErrors()->getMessages() as $error) {
$errors .= implode(", ",$error);
if ($user->isDirty()) { //if nothing on the user changed, don't bother trying to save anything nor put anything in the summary
if ($user->save()) {
$summary['note'] = ($user->wasRecentlyCreated ? 'CREATED' : 'UPDATED');
$summary['status'] = 'SUCCESS';
} else {
$errors = '';
foreach ($user->getErrors()->getMessages() as $error) {
$errors .= implode(", ",$error);
}
$summary['note'] = $snipeUser->getDN().' was not imported. REASON: '.$errors;
$summary['status'] = 'ERROR';
}
$summary['note'] = $snipeUser->getDN().' was not imported. REASON: '.$errors;
$summary['status'] = 'ERROR';
} else {
$summary = null;
}
}
// $summary['note'] = ($user->getOriginal('username') ? 'UPDATED' : 'CREATED'); // this seems, kinda, like, superfluous, relative to the $summary['note'] thing above, yeah?
$this->summary->push($summary);
if($summary) { //if the $user wasn't dirty, $summary was set to null so that we will skip the following push()
$this->summary->push($summary);
}
}
/**
@@ -49,6 +49,7 @@ class ReportsController extends Controller
'created_at',
'target_id',
'user_id',
'accept_signature',
'action_type',
'note'
];
@@ -143,11 +143,10 @@ class LicenseFilesController extends Controller
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') {
\Log::debug('The private filesystem is local');
return Response::make(Storage::get($file));
return Storage::download($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) {
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}
@@ -70,7 +70,7 @@ class ManufacturersController extends Controller
$manufacturer->support_url = $request->input('support_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');
$manufacturer = $request->handleImages($manufacturer,600, public_path().'/uploads/manufacturers');
$manufacturer = $request->handleImages($manufacturer);
@@ -137,7 +137,7 @@ class ManufacturersController extends Controller
$manufacturer->image = null;
}
$manufacturer = $request->handleImages($manufacturer,600, public_path().'/uploads/manufacturers');
$manufacturer = $request->handleImages($manufacturer);
if ($manufacturer->save()) {
+1 -1
View File
@@ -682,7 +682,7 @@ class ReportsController extends Controller
$diff = ($asset->purchase_cost - $depreciation);
$row[] = Helper::formatCurrencyOutput($depreciation);
$row[] = Helper::formatCurrencyOutput($diff);
$row[] = ($asset->depreciated_date()!='') ? $asset->depreciated_date()->format('Y-m-d') : '';
$row[] = ($asset->depreciation) ? $asset->depreciated_date()->format('Y-m-d') : '';
}
if ($request->filled('checkout_date')) {
@@ -113,7 +113,7 @@ class ActionlogsTransformer
] : null,
'note' => ($actionlog->note) ? e($actionlog->note): null,
'signature_file' => ($actionlog->signature_filename) ? route('log.signature.view', ['filename' => $actionlog->signature_filename ]) : null,
'signature_file' => ($actionlog->accept_signature) ? route('log.signature.view', ['filename' => $actionlog->accept_signature ]) : null,
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): null,
+2 -1
View File
@@ -33,7 +33,8 @@ return [
* how many proxies that client's request has
* subsequently passed through.
*/
'proxies' => null, // [<ip addresses>,], '*'
'proxies' => env('APP_TRUSTED_PROXIES') !== null ?
explode(',', env('APP_TRUSTED_PROXIES')) : '*',
/*
* To trust one or more specific proxies that connect
+6 -6
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v5.0.0',
'full_app_version' => 'v5.0.0 - build 4484-g33cf4896d',
'build_version' => '4484',
'app_version' => 'v5.0.2',
'full_app_version' => 'v5.0.2 - build 5414-gc3e8f6406',
'build_version' => '5414',
'prerelease_version' => '',
'hash_version' => 'g33cf4896d',
'full_hash' => 'v5.0.0-1-g33cf4896d',
'branch' => 'develop',
'hash_version' => 'gc3e8f6406',
'full_hash' => 'v5.0.1-19-gc3e8f6406',
'branch' => 'master',
);
@@ -144,6 +144,10 @@ a, a:link, a:visited, .btn-primary.hover {
#assetsListingTable>tbody>tr.selected>td {
background-color: var(--back-main);
}
#assetsListingTable>tbody>tr>td {
color: var(--link);
}
body {
color: var(--text-main);
}
@@ -201,6 +205,13 @@ body {
background-color: var(--back-main);
color: var(--text-main);
}
.dynamic-form-row{
color: @green;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
color: var(--header);
}
.form-control {
background-color: var(--back-main);
color: var(--text-main);
@@ -219,6 +230,9 @@ input[type=text], input[type=search] {
background-color: var(--back-sub)!important;
color: var(--text-main);
}
li.select2-results__option{
color:@green;
}
#licensesTable>tbody>tr>td>nobr>a>i.fa {
color: var(--text-main);
}
@@ -293,7 +307,9 @@ input[type=text], input[type=search] {
#webui>div>div>div>div>div>table>tbody>tr>td>a>i.fa {
color: var(--text-main);
}
#webui>#app>.row>.col-md-12>.box>.box-body>.row>.col-md-12 {
color:@green;
}
a {
color: var(--link);
&:link {
@@ -333,4 +349,3 @@ a {
border-top: 1px solid #dddddd;
display: table-cell;
}
+1 -1
View File
@@ -6,7 +6,7 @@ return array(
'ad_domain_help' => 'This is sometimes the same as your email domain, but not always.',
'ad_append_domain_label' => 'Append domain name',
'ad_append_domain' => 'Append domain name to username field',
'ad_append_domain_help' => 'User doesn\'t require to write "username@domain.local", they can just type "username".' ,
'ad_append_domain_help' => 'User isn\'t required to write "username@domain.local", they can just type "username".' ,
'admin_cc_email' => 'CC Email',
'admin_cc_email_help' => 'If you would like to send a copy of checkin/checkout emails that are sent to users to an additional email account, enter it here. Otherwise leave this field blank.',
'is_ad' => 'This is an Active Directory server',
@@ -11,7 +11,7 @@
@section('content')
<link rel="stylesheet" href="{{ mix('css/signature-pad.min.css') }}">
<link rel="stylesheet" href="{{ url('css/signature-pad.min.css') }}">
<style>
.form-horizontal .control-label, .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline {
@@ -25,6 +25,12 @@
overflow: scroll;
}
.m-signature-pad--body {
border-style: solid;
border-color: grey;
border-width: thin;
}
</style>
+1 -1
View File
@@ -47,7 +47,7 @@
</div>
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'required' => 'true'])
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'field_req' => true])
<div id='custom_fields_content'>
@@ -39,7 +39,6 @@
data-pagination="true"
data-id-table="requestedAssets"
data-cookie-id-table="requestedAssets"
data-url="{{ route('api.consumables.index') }}"
data-export-options='{
"fileName": "export-assetrequests-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
@@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" data-validation="required" required>
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" {{ (isset($field_req) ? 'data-validation="required" required' : '') }}>
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $model_id }}" selected="selected">
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}
+1 -1
View File
@@ -128,7 +128,7 @@
<div id="purgebarcodesstatus-error" class="text-danger"></div>
</div>
<div class="col-md-9 col-md-offset-3">
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode dettings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode settings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
</div>
</div>
+2
View File
@@ -353,6 +353,8 @@
<form action="{{ route('users/bulkedit') }}" method="POST">
<!-- CSRF Token -->
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
<input type="hidden" name="bulk_actions" value="delete" />
<input type="hidden" name="ids[{{ $user->id }}]" value="{{ $user->id }}" />
<button style="width: 100%;" class="btn btn-sm btn-danger hidden-print">{{ trans('button.checkin_and_delete') }}</button>
</form>
-54
View File
@@ -187,29 +187,6 @@ $up = shell_exec('php artisan up');
echo '-- '.$up."\n\n";
echo "--------------------------------------------------------\n";
echo "Step 11: Checking for v5 public storage directories: \n";
echo "--------------------------------------------------------\n\n";
if ((!file_exists('storage/app/public')) && (!is_dir('storage/app/public'))) {
echo "- No public directory found in storage/app - creating one.\n\n";
if (!mkdir('storage/app/public', 0777, true)) {
echo "ERROR: Failed to create directory at storage/app/public. You should do this manually.\n\n";
}
$storage_simlink = shell_exec('php artisan storage:link');
echo $storage_simlink;
} else {
echo "- Public storage directory already exists. Skipping...\n\n";
}
echo "- Copying files into storage/app/public.\n\n";
if (rmove('public/uploads','storage/app/public')) {
echo "- Copy successful.\n\n";
} else {
echo "- Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.\n\n";
}
echo "--------------------------------------------------------\n";
echo "FINISHED! Clear your browser cookies and re-login to use :\n";
@@ -217,34 +194,3 @@ echo "your upgraded Snipe-IT.\n";
echo "--------------------------------------------------------\n\n";
/**
* Recursively move files from one directory to another
*
* @param String $src - Source of files being moved
* @param String $dest - Destination of files being moved
*/
function rmove($src, $dest){
// If source is not a directory stop processing
if(!is_dir($src)) return false;
// If the destination directory does not exist create it
if(!is_dir($dest)) {
if(!mkdir($dest)) {
// If the destination directory could not be created stop processing
return false;
}
}
// Open the source directory to read in files
$i = new DirectoryIterator($src);
foreach($i as $f) {
if($f->isFile()) {
rename($f->getRealPath(), "$dest/" . $f->getFilename());
} else if(!$f->isDot() && $f->isDir()) {
rmove($f->getRealPath(), "$dest/$f");
unlink($f->getRealPath());
}
}
unlink($src);
}