diff --git a/.all-contributorsrc b/.all-contributorsrc
index d59e3f694..2b182a247 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -2308,10 +2308,28 @@
]
},
{
- "login": "Nevets82",
- "name": "Steven",
- "avatar_url": "https://avatars.githubusercontent.com/u/4462739?v=4",
- "profile": "http://nevets82.github.io",
+ "login": "JohnnyPicnic",
+ "name": "JohnnyPicnic",
+ "avatar_url": "https://avatars.githubusercontent.com/u/5553884?v=4",
+ "profile": "https://github.com/JohnnyPicnic",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "markbrule",
+ "name": "markbrule",
+ "avatar_url": "https://avatars.githubusercontent.com/u/8799594?v=4",
+ "profile": "https://github.com/markbrule",
+ "contributions": [
+ "code"
+ ]
+ },
+ {
+ "login": "mikecmpbll",
+ "name": "Mike Campbell",
+ "avatar_url": "https://avatars.githubusercontent.com/u/1962801?v=4",
+ "profile": "https://github.com/mikecmpbll",
"contributions": [
"code"
]
diff --git a/.env.example b/.env.example
index b4b173414..31e3cca14 100644
--- a/.env.example
+++ b/.env.example
@@ -77,7 +77,7 @@ ENCRYPT=false
COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false
-API_TOKEN_EXPIRATION_YEARS=40
+API_TOKEN_EXPIRATION_YEARS=15
# --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 24a7c3d1f..64cac8df2 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -57,7 +57,7 @@ RUN \
&& mkdir -p "/var/lib/snipeit/dumps" && rm -r "/var/www/html/storage/app/backups" && ln -fs "/var/lib/snipeit/dumps" "/var/www/html/storage/app/backups" \
&& mkdir -p "/var/lib/snipeit/keys" && ln -fs "/var/lib/snipeit/keys/oauth-private.key" "/var/www/html/storage/oauth-private.key" \
&& ln -fs "/var/lib/snipeit/keys/oauth-public.key" "/var/www/html/storage/oauth-public.key" \
- && chown -h "/var/www/html/storage/*.key"
+ && chown -hR apache "/var/www/html/storage/" \
&& chown -R apache "/var/lib/snipeit"
# Install composer
diff --git a/README.md b/README.md
index 7073e9642..0b7f4c3de 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
 [](https://crowdin.com/project/snipe-it) [](https://gitter.im/snipe/snipe-it?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [](https://hub.docker.com/r/snipe/snipe-it/) [](https://twitter.com/snipeitapp) [](https://www.codacy.com/app/snipe/snipe-it?utm_source=github.com&utm_medium=referral&utm_content=snipe/snipe-it&utm_campaign=Badge_Grade)
-[](#contributors)
+[](#contributors)
## Snipe-IT - Open Source Asset Management System
@@ -125,7 +125,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
| [
Kevin KΓΆllmann](https://www.kevinkoellmann.de)
[π»](https://github.com/snipe/snipe-it/commits?author=koelle25 "Code") | [
sw-mreyes](https://github.com/sw-mreyes)
[π»](https://github.com/snipe/snipe-it/commits?author=sw-mreyes "Code") | [
Joel Pittet](https://pittet.ca)
[π»](https://github.com/snipe/snipe-it/commits?author=joelpittet "Code") | [
Eli Young](https://elyscape.com)
[π»](https://github.com/snipe/snipe-it/commits?author=elyscape "Code") | [
Raell Dottin](https://github.com/raelldottin)
[π»](https://github.com/snipe/snipe-it/commits?author=raelldottin "Code") | [
Tom Misilo](https://github.com/misilot)
[π»](https://github.com/snipe/snipe-it/commits?author=misilot "Code") | [
David Davenne](http://david.davenne.be)
[π»](https://github.com/snipe/snipe-it/commits?author=JuustoMestari "Code") |
| [
Mark Stenglein](https://markstenglein.com)
[π»](https://github.com/snipe/snipe-it/commits?author=ocelotsloth "Code") | [
ajsy](https://github.com/ajsy)
[π»](https://github.com/snipe/snipe-it/commits?author=ajsy "Code") | [
Jan Kiesewetter](https://github.com/t3easy)
[π»](https://github.com/snipe/snipe-it/commits?author=t3easy "Code") | [
Tetrachloromethane250](https://github.com/Tetrachloromethane250)
[π»](https://github.com/snipe/snipe-it/commits?author=Tetrachloromethane250 "Code") | [
Lars Kajes](https://www.kajes.se/)
[π»](https://github.com/snipe/snipe-it/commits?author=kajes "Code") | [
Joly0](https://github.com/Joly0)
[π»](https://github.com/snipe/snipe-it/commits?author=Joly0 "Code") | [
theburger](https://github.com/limeless)
[π»](https://github.com/snipe/snipe-it/commits?author=limeless "Code") |
| [
David Valin Alonso](https://github.com/deivishome)
[π»](https://github.com/snipe/snipe-it/commits?author=deivishome "Code") | [
andreaci](https://github.com/andreaci)
[π»](https://github.com/snipe/snipe-it/commits?author=andreaci "Code") | [
Jelle Sebreghts](http://www.jellesebreghts.be)
[π»](https://github.com/snipe/snipe-it/commits?author=Jelle-S "Code") | [
Michael Pietsch](https://github.com/Skywalker-11)
| [
Masudul Haque Shihab](https://github.com/sh1hab)
[π»](https://github.com/snipe/snipe-it/commits?author=sh1hab "Code") | [
Supapong Areeprasertkul](http://www.freedomdive.com/)
[π»](https://github.com/snipe/snipe-it/commits?author=zybersup "Code") | [
Peter Sarossy](https://github.com/psarossy)
[π»](https://github.com/snipe/snipe-it/commits?author=psarossy "Code") |
-| [
Renee Margaret McConahy](https://github.com/nepella)
[π»](https://github.com/snipe/snipe-it/commits?author=nepella "Code") | [
Steven](http://nevets82.github.io)
[π»](https://github.com/snipe/snipe-it/commits?author=Nevets82 "Code") |
+| [
Renee Margaret McConahy](https://github.com/nepella)
[π»](https://github.com/snipe/snipe-it/commits?author=nepella "Code") | [
JohnnyPicnic](https://github.com/JohnnyPicnic)
[π»](https://github.com/snipe/snipe-it/commits?author=JohnnyPicnic "Code") | [
markbrule](https://github.com/markbrule)
[π»](https://github.com/snipe/snipe-it/commits?author=markbrule "Code") | [
Mike Campbell](https://github.com/mikecmpbll)
[π»](https://github.com/snipe/snipe-it/commits?author=mikecmpbll "Code") |
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php
index f27d48c7c..edbf90d15 100644
--- a/app/Http/Controllers/Api/AccessoriesController.php
+++ b/app/Http/Controllers/Api/AccessoriesController.php
@@ -287,7 +287,7 @@ class AccessoriesController extends Controller
$accessory = Accessory::find($accessory_user->accessory_id);
$this->authorize('checkin', $accessory);
- $logaction = $accessory->logCheckin(User::find($accessoryUserId), $request->input('note'));
+ $logaction = $accessory->logCheckin(User::find($accessory_user->user_id), $request->input('note'));
// Was the accessory updated?
if (DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) {
diff --git a/app/Http/Controllers/Assets/AssetFilesController.php b/app/Http/Controllers/Assets/AssetFilesController.php
index 28aa3097c..7cdd075ab 100644
--- a/app/Http/Controllers/Assets/AssetFilesController.php
+++ b/app/Http/Controllers/Assets/AssetFilesController.php
@@ -110,15 +110,15 @@ class AssetFilesController extends Controller
{
$asset = Asset::find($assetId);
$this->authorize('update', $asset);
- $rel_path = 'storage/private_uploads/assets';
+ $rel_path = 'private_uploads/assets';
// the asset is valid
if (isset($asset->id)) {
$this->authorize('update', $asset);
$log = Actionlog::find($fileId);
if ($log) {
- if (file_exists(base_path().'/'.$rel_path.'/'.$log->filename)) {
- Storage::disk('public')->delete($rel_path.'/'.$log->filename);
+ if (Storage::exists($rel_path.'/'.$log->filename)) {
+ Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();
return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
diff --git a/app/Http/Controllers/ReportsController.php b/app/Http/Controllers/ReportsController.php
index 3b55e43a0..4b92634b4 100644
--- a/app/Http/Controllers/ReportsController.php
+++ b/app/Http/Controllers/ReportsController.php
@@ -641,7 +641,7 @@ class ReportsController extends Controller
$assets->whereBetween('assets.next_audit_date', [$request->input('next_audit_start'), $request->input('next_audit_end')]);
}
- $assets->orderBy('assets.created_at', 'ASC')->chunk(20, function($assets) use($handle, $customfields, $request) {
+ $assets->orderBy('assets.id', 'ASC')->chunk(20, function($assets) use($handle, $customfields, $request) {
$executionTime = microtime(true) - $_SERVER["REQUEST_TIME_FLOAT"];
\Log::debug('Walking results: '.$executionTime);