Compare commits

...

15 Commits

Author SHA1 Message Date
snipe 117b4c59cc Bumped minor version 2019-01-25 21:06:08 -08:00
snipe 194d0733d4 Fixed #6644 - asset name not linked in Reports > Asset Maintenance Report
This report will likely be deprecated.
2019-01-25 20:57:14 -08:00
snipe a371e8d53f Added calibration as a maintenance type
Should just make these custmizable options
2019-01-24 15:17:33 -08:00
snipe 8f09cca043 Fixed incorrect group route 2019-01-24 15:17:11 -08:00
snipe 39bca49e8f Specify table name in deleted user display 2019-01-24 14:38:18 -08:00
snipe b8269020ae Specify table name in deleted user display 2019-01-24 14:37:39 -08:00
snipe 601c129bbf Embed images in emails 2019-01-17 20:45:24 -08:00
snipe b293d00699 Switch LDAP error to debug, to avoid crapping up the logs 2019-01-17 20:18:03 -08:00
snipe 75a0cf97e2 Return an error if asset maintenance is associated with a non-existant asset 2019-01-16 02:19:57 -08:00
snipe c055e3af21 Only try to return the asset tag link if a valid asset id has been passed 2019-01-16 02:19:35 -08:00
snipe a1f93e733c Fixed undefined error when maintenance is associated with a deleted asset 2019-01-16 01:45:51 -08:00
fanta8897 49073742b5 Updating LDAP such that each user is not required to be bindable to LDAP (#6571)
* Update Ldap.php

* Update Ldap.php

* Update Ldap.php

* Update Ldap.php

* Update Ldap.php

Updating LDAP.php such that the admin bind will ONLY occur if the user attempting auth cannot bind. If that is the case, it will attempt to bind as admin and search for that user, prior to failing.
2019-01-15 14:04:21 -08:00
Sxderp 187206cb88 Fix saving of REMOTE_USER setting broken by 1a64879b6 (#6565)
The previous commit made it such that remote user login could only
be enabled if two factor authentication was also enabled. Unnest
the configuration so that the setting can be applied without.
2019-01-15 13:59:36 -08:00
Hubert 8420cb7ec1 Fixed problem with import when using snipeit:import command (#6550) 2019-01-15 13:58:23 -08:00
Andrey Bolonin 75252bce05 add php 7.3 (#6556) 2019-01-10 13:21:04 -08:00
17 changed files with 95 additions and 24 deletions
+1
View File
@@ -18,6 +18,7 @@ php:
- 7.0
- 7.2
- 7.1.4
- 7.3
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
@@ -162,6 +162,9 @@ class AssetMaintenancesController extends Controller
// Redirect to the improvement management page
return redirect()->route('maintenances.index')
->with('error', trans('admin/asset_maintenances/message.not_found'));
} elseif (!$assetMaintenance->asset) {
return redirect()->route('maintenances.index')
->with('error', 'The asset associated with this maintenance does not exist.');
} elseif (!Company::isCurrentUserHasAccess($assetMaintenance->asset)) {
return static::getInsufficientPermissionsRedirect();
}
@@ -80,7 +80,7 @@ class LoginController extends Controller
Log::debug("Remote user auth lookup complete");
if(!is_null($user)) Auth::login($user, true);
} catch(Exception $e) {
Log::error("There was an error authenticating the Remote user: " . $e->getMessage());
Log::debug("There was an error authenticating the Remote user: " . $e->getMessage());
}
}
}
@@ -169,7 +169,7 @@ class LoginController extends Controller
// If the user was unable to login via LDAP, log the error and let them fall through to
// local authentication.
} catch (\Exception $e) {
Log::error("There was an error authenticating the LDAP user: ".$e->getMessage());
Log::debug("There was an error authenticating the LDAP user: ".$e->getMessage());
}
}
+3 -3
View File
@@ -72,7 +72,7 @@ class GroupsController extends Controller
if ($group->save()) {
return redirect()->route("groups.index")->with('success', trans('admin/groups/message.success.create'));
}
return redirect(route('groups.create'))->withInput()->withErrors($group->getErrors());
return redirect()->back()->withInput()->withErrors($group->getErrors());
}
/**
@@ -111,7 +111,7 @@ class GroupsController extends Controller
{
$permissions = config('permissions');
if (!$group = Group::find($id)) {
return redirect()->route('groups')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
}
$group->name = e(Input::get('name'));
$group->permissions = json_encode(Input::get('permission'));
@@ -138,7 +138,7 @@ class GroupsController extends Controller
{
if (!config('app.lock_passwords')) {
if (!$group = Group::find($id)) {
return redirect()->route('groups')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
}
$group->delete();
// Redirect to the group management page
+4 -5
View File
@@ -482,13 +482,12 @@ class SettingsController extends Controller
$setting->two_factor_enabled = null;
} else {
$setting->two_factor_enabled = $request->input('two_factor_enabled');
# remote user login
$setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled');
$setting->login_common_disabled= (int)$request->input('login_common_disabled');
$setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url');
}
# remote user login
$setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled');
$setting->login_common_disabled = (int)$request->input('login_common_disabled');
$setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url');
}
$setting->pwd_secure_uncommon = (int) $request->input('pwd_secure_uncommon');
@@ -28,7 +28,7 @@ class AssetMaintenancesTransformer
'asset_tag'=> e($assetmaintenance->asset->asset_tag)
] : null,
'company' => (($assetmaintenance->asset->company) && ($assetmaintenance->asset)) ? [
'company' => (($assetmaintenance->asset) && ($assetmaintenance->asset->company)) ? [
'id' => (int) $assetmaintenance->asset->company->id,
'name'=> ($assetmaintenance->asset->company->name) ? e($assetmaintenance->asset->company->name) : null,
+2
View File
@@ -72,6 +72,8 @@ class AssetMaintenance extends Model implements ICompanyableChild
trans('admin/asset_maintenances/general.repair') => trans('admin/asset_maintenances/general.repair'),
trans('admin/asset_maintenances/general.upgrade') => trans('admin/asset_maintenances/general.upgrade'),
'PAT test' => 'PAT test',
trans('admin/asset_maintenances/general.calibration') => trans('admin/asset_maintenances/general.calibration'),
'PAT test' => 'PAT test',
];
}
+4 -1
View File
@@ -96,8 +96,11 @@ class Ldap extends Model
$filterQuery = $settings->ldap_auth_filter_query . $username;
if (!$ldapbind = @ldap_bind($connection, $userDn, $password)) {
return false;
if(!$ldapbind = Ldap::bindAdminToLdap($connection)){
return false;
}
}
if (!$results = ldap_search($connection, $baseDn, $filterQuery)) {
+2 -1
View File
@@ -41,7 +41,8 @@ trait Loggable
$settings = Setting::getSettings();
$log = new Actionlog;
$log = $this->determineLogItemType($log);
$log->user_id = Auth::user()->id;
if(Auth::user())
$log->user_id = Auth::user()->id;
if (!isset($target)) {
throw new Exception('All checkout logs require a target');
+2 -2
View File
@@ -328,7 +328,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
public function scopeGetDeleted($query)
{
return $query->withTrashed()->whereNotNull('deleted_at');
return $query->withTrashed()->whereNotNull('users.deleted_at');
}
public function scopeGetNotDeleted($query)
@@ -445,7 +445,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
public function scopeDeleted($query)
{
return $query->whereNotNull('deleted_at');
return $query->whereNotNull('users.deleted_at');
}
+1
View File
@@ -12,6 +12,7 @@
"doctrine/dbal": "^2.5.13",
"doctrine/inflector": "1.1.*",
"doctrine/instantiator": "1.0.*",
"eduardokum/laravel-mail-auto-embed": "^1.0",
"erusev/parsedown": "^1.6",
"fideloper/proxy": "^3.3",
"intervention/image": "^2.3",
Generated
+56 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "b575236d6ef1d5f8799acf86ca03bc4e",
"content-hash": "f44697f67c1de6fd46cb9a7cb8bc20a6",
"packages": [
{
"name": "barryvdh/laravel-debugbar",
@@ -729,6 +729,61 @@
],
"time": "2014-09-09T13:34:57+00:00"
},
{
"name": "eduardokum/laravel-mail-auto-embed",
"version": "1.0.4",
"source": {
"type": "git",
"url": "https://github.com/eduardokum/laravel-mail-auto-embed.git",
"reference": "918c3aff220d965fbaee96ae4d48a09036381bdf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/eduardokum/laravel-mail-auto-embed/zipball/918c3aff220d965fbaee96ae4d48a09036381bdf",
"reference": "918c3aff220d965fbaee96ae4d48a09036381bdf",
"shasum": ""
},
"require": {
"illuminate/contracts": ">=5.3",
"illuminate/mail": ">=5.3",
"illuminate/support": ">=5.3",
"php": ">=5.5.0"
},
"require-dev": {
"orchestra/testbench": "~3.0",
"phpunit/phpunit": "~5.0|~6.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Eduardokum\\LaravelMailAutoEmbed\\ServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Eduardokum\\LaravelMailAutoEmbed\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eduardo Gusmão",
"email": "eduguscontra3@hotmail.com"
}
],
"description": "Library for embed images in emails automatically",
"homepage": "https://github.com/eduardokum/laravel-mail-auto-embed",
"keywords": [
"eduardokum",
"laravel-mail-auto-embed"
],
"time": "2017-09-21T12:11:32+00:00"
},
{
"name": "erusev/parsedown",
"version": "1.7.1",
+1
View File
@@ -297,6 +297,7 @@ return [
Unicodeveloper\DumbPassword\DumbPasswordServiceProvider::class,
Schuppo\PasswordStrength\PasswordStrengthServiceProvider::class,
Tightenco\Ziggy\ZiggyServiceProvider::class, // Laravel routes in vue
Eduardokum\LaravelMailAutoEmbed\ServiceProvider::class,
/*
* Application Service Providers...
+5 -5
View File
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v4.6.7',
'full_app_version' => 'v4.6.7 - build 3944-g8f6ea84fc',
'build_version' => '3944',
'app_version' => 'v4.6.8',
'full_app_version' => 'v4.6.8 - build 3959-g194d0733d',
'build_version' => '3959',
'prerelease_version' => '',
'hash_version' => 'g8f6ea84fc',
'full_hash' => 'v4.6.7-15-g8f6ea84fc',
'hash_version' => 'g194d0733d',
'full_hash' => 'v4.6.8-14-g194d0733d',
'branch' => 'master',
);
@@ -7,5 +7,6 @@
'view' => 'View Asset Maintenance Details',
'repair' => 'Repair',
'maintenance' => 'Maintenance',
'upgrade' => 'Upgrade'
'upgrade' => 'Upgrade',
'calibration' => 'Calibration'
];
@@ -435,7 +435,11 @@
}
function assetTagLinkFormatter(value, row) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.asset_tag + '</a>';
if ((row.asset) && (row.asset.id)) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.asset_tag + '</a>';
}
return '';
}
function assetNameLinkFormatter(value, row) {
@@ -37,7 +37,7 @@
<tr>
<th data-field="company" data-sortable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
<th data-sortable="false" data-field="asset_name" data-formatter="hardwareLinkObjFormatter">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
<th data-sortable="false" data-field="asset_name" data-formatter="assetNameLinkFormatter">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
<th data-sortable="false" data-field="supplier" data-formatter="suppliersLinkObjFormatter">{{ trans('general.supplier') }}</th>
<th data-searchable="true" data-sortable="true" data-field="asset_maintenance_type">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
<th data-searchable="true" data-sortable="true" data-field="title">{{ trans('admin/asset_maintenances/form.title') }}</th>