Merge branch 'develop'

This commit is contained in:
snipe 2017-10-10 12:48:05 -07:00
commit 33497c9811
14 changed files with 555 additions and 231 deletions

View file

@ -8,7 +8,6 @@ APP_URL=null
APP_TIMEZONE='UTC' APP_TIMEZONE='UTC'
APP_LOCALE=en APP_LOCALE=en
# -------------------------------------------- # --------------------------------------------
# REQUIRED: DATABASE SETTINGS # REQUIRED: DATABASE SETTINGS
# -------------------------------------------- # --------------------------------------------
@ -31,7 +30,6 @@ DB_SSL_CERT_PATH=null
DB_SSL_CA_PATH=null DB_SSL_CA_PATH=null
DB_SSL_CIPHER=null DB_SSL_CIPHER=null
# -------------------------------------------- # --------------------------------------------
# REQUIRED: OUTGOING MAIL SERVER SETTINGS # REQUIRED: OUTGOING MAIL SERVER SETTINGS
# -------------------------------------------- # --------------------------------------------
@ -46,14 +44,12 @@ MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=you@example.com MAIL_REPLYTO_ADDR=you@example.com
MAIL_REPLYTO_NAME='Snipe-IT' MAIL_REPLYTO_NAME='Snipe-IT'
# -------------------------------------------- # --------------------------------------------
# REQUIRED: IMAGE LIBRARY # REQUIRED: IMAGE LIBRARY
# This should be gd or imagick # This should be gd or imagick
# -------------------------------------------- # --------------------------------------------
IMAGE_LIB=gd IMAGE_LIB=gd
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: SESSION SETTINGS # OPTIONAL: SESSION SETTINGS
# -------------------------------------------- # --------------------------------------------
@ -64,14 +60,12 @@ COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null COOKIE_DOMAIN=null
SECURE_COOKIES=false SECURE_COOKIES=false
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: SECURITY HEADER SETTINGS # OPTIONAL: SECURITY HEADER SETTINGS
# -------------------------------------------- # --------------------------------------------
REFERRER_POLICY=same-origin REFERRER_POLICY=same-origin
ENABLE_CSP=false ENABLE_CSP=false
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: CACHE SETTINGS # OPTIONAL: CACHE SETTINGS
# -------------------------------------------- # --------------------------------------------
@ -79,6 +73,12 @@ CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
# --------------------------------------------
# OPTIONAL: REDIS SETTINGS
# --------------------------------------------
REDIS_HOST=null
REDIS_PASSWORD=null
REDIS_PORT-null
# -------------------------------------------- # --------------------------------------------
# OPTIONAL: AWS S3 SETTINGS # OPTIONAL: AWS S3 SETTINGS

View file

@ -69,7 +69,15 @@ class LdapSync extends Command
$results = Ldap::findLdapUsers(); $results = Ldap::findLdapUsers();
$ldap_ou_locations = Location::whereNotNull('ldap_ou')->get(); // Retrieve locations with a mapped OU, and sort them from the shallowest to deepest OU (see #3993)
$ldap_ou_locations = Location::whereNotNull('ldap_ou')->get()->toArray();
$ldap_ou_lengths = array();
foreach ($ldap_ou_locations as $location) {
$ldap_ou_lengths[] = strlen($location["ldap_ou"]);
}
array_multisort($ldap_ou_lengths, SORT_ASC, $ldap_ou_locations);
if (sizeof($ldap_ou_locations) > 0) { if (sizeof($ldap_ou_locations) > 0) {
LOG::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.'); LOG::debug('Some locations have special OUs set. Locations will be automatically set for users in those OUs.');
@ -99,11 +107,11 @@ class LdapSync extends Command
// Grab subsets based on location-specific DNs, and overwrite location for these users. // Grab subsets based on location-specific DNs, and overwrite location for these users.
foreach ($ldap_ou_locations as $ldap_loc) { foreach ($ldap_ou_locations as $ldap_loc) {
$location_users = Ldap::findLdapUsers($ldap_loc->ldap_ou); $location_users = Ldap::findLdapUsers($ldap_loc["ldap_ou"]);
$usernames = array(); $usernames = array();
for ($i = 0; $i < $location_users["count"]; $i++) { for ($i = 0; $i < $location_users["count"]; $i++) {
$location_users[$i]["ldap_location_override"] = true; $location_users[$i]["ldap_location_override"] = true;
$location_users[$i]["location_id"] = $ldap_loc->id; $location_users[$i]["location_id"] = $ldap_loc["id"];
$usernames[] = $location_users[$i][$ldap_result_username][0]; $usernames[] = $location_users[$i][$ldap_result_username][0];
} }
@ -194,7 +202,6 @@ class LdapSync extends Command
} else { } else {
$this->info('User '.$summary[$x]['firstname'].' '.$summary[$x]['lastname'].' (username: '.$summary[$x]['username'].' was '.strtoupper($summary[$x]['createorupdate']).'.'); $this->info('User '.$summary[$x]['firstname'].' '.$summary[$x]['lastname'].' (username: '.$summary[$x]['username'].' was '.strtoupper($summary[$x]['createorupdate']).'.');
} }
} }
} else if ($this->option('json_summary')) { } else if ($this->option('json_summary')) {
$json_summary = [ "error" => false, "error_message" => "", "summary" => $summary ]; $json_summary = [ "error" => false, "error_message" => "", "summary" => $summary ];

View file

@ -46,7 +46,7 @@ class ResetDemoSettings extends Command
$settings->per_page = 20; $settings->per_page = 20;
$settings->site_name = 'Snipe-IT Asset Management Demo'; $settings->site_name = 'Snipe-IT Asset Management Demo';
$settings->auto_increment_assets = 1; $settings->auto_increment_assets = 1;
$settings->logo = 'logo.png'; $settings->logo = 'snipe-logo.png';
$settings->alert_email = 'service@snipe-it.io'; $settings->alert_email = 'service@snipe-it.io';
$settings->header_color = null; $settings->header_color = null;
$settings->barcode_type = 'QRCODE'; $settings->barcode_type = 'QRCODE';

View file

@ -89,6 +89,7 @@ class LocationsController extends Controller
$location->state = Input::get('state'); $location->state = Input::get('state');
$location->country = Input::get('country'); $location->country = Input::get('country');
$location->zip = Input::get('zip'); $location->zip = Input::get('zip');
$location->ldap_ou = Input::get('ldap_ou');
$location->manager_id = Input::get('manager_id'); $location->manager_id = Input::get('manager_id');
$location->user_id = Auth::id(); $location->user_id = Auth::id();

View file

@ -0,0 +1,99 @@
<?php
namespace App\Policies;
use App\Models\Company;
use App\Models\Category;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CategoryPolicy
{
use HandlesAuthorization;
public function before(User $user, $category)
{
// Lets move all company related checks here.
if ($category instanceof \App\Models\Category && !Company::isCurrentUserHasAccess($category)) {
return false;
}
// If an admin, they can do all asset related tasks.
if ($user->hasAccess('admin')) {
return true;
}
}
/**
* Determine whether the user can view the category.
*
* @param \App\Models\User $user
* @param \App\Category $category
* @return mixed
*/
public function view(User $user)
{
return $user->hasAccess('categories.view');
}
/**
* Determine whether the user can create categories.
*
* @param \App\Models\User $user
* @return mixed
*/
public function create(User $user)
{
return $user->hasAccess('categories.create');
}
/**
* Determine whether the user can update the category.
*
* @param \App\Models\User $user
* @param \App\Category $category
* @return mixed
*/
public function update(User $user)
{
//
return $user->hasAccess('categories.edit');
}
/**
* Determine whether the user can delete the category.
*
* @param \App\Models\User $user
* @param \App\Category $category
* @return mixed
*/
public function delete(User $user)
{
//
return $user->hasAccess('categories.delete');
}
/**
* Determine whether the user can view the category index.
*
* @param \App\Models\User $user
* @param \App\Models\Category $category
* @return mixed
*/
public function index(User $user)
{
return $user->hasAccess('categories.view');
}
/**
* Determine whether the user can manage the category.
*
* @param \App\Models\User $user
* @param \App\Models\Category $category
* @return mixed
*/
public function manage(User $user)
{
return $user->hasAccess('categories.edit');
}
}

View file

@ -0,0 +1,99 @@
<?php
namespace App\Policies;
use App\Models\Company;
use App\Models\Location;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class LocationPolicy
{
use HandlesAuthorization;
public function before(User $user, $location)
{
// Lets move all company related checks here.
if ($location instanceof \App\Models\Location && !Company::isCurrentUserHasAccess($location)) {
return false;
}
// If an admin, they can do all asset related tasks.
if ($user->hasAccess('admin')) {
return true;
}
}
/**
* Determine whether the user can view the location.
*
* @param \App\Models\User $user
* @param \App\Models\Location $location
* @return mixed
*/
public function view(User $user)
{
return $user->hasAccess('locations.view');
}
/**
* Determine whether the user can create locations.
*
* @param \App\Models\\User $user
* @return mixed
*/
public function create(User $user)
{
return $user->hasAccess('locations.create');
}
/**
* Determine whether the user can update the location.
*
* @param \App\Models\User $user
* @param \App\Models\Location $location
* @return mixed
*/
public function update(User $user)
{
//
return $user->hasAccess('locations.edit');
}
/**
* Determine whether the user can delete the location.
*
* @param \App\Models\User $user
* @param \App\Models\Location $location
* @return mixed
*/
public function delete(User $user)
{
//
return $user->hasAccess('locations.delete');
}
/**
* Determine whether the user can view the location index.
*
* @param \App\Models\User $user
* @param \App\Models\Accessory $location
* @return mixed
*/
public function index(User $user)
{
return $user->hasAccess('locations.view');
}
/**
* Determine whether the user can manage the location.
*
* @param \App\Models\User $user
* @param \App\Models\Location $location
* @return mixed
*/
public function manage(User $user)
{
return $user->hasAccess('locations.edit');
}
}

View file

@ -5,7 +5,9 @@ namespace App\Providers;
use App\Models\Accessory; use App\Models\Accessory;
use Carbon\Carbon; use Carbon\Carbon;
use App\Models\Asset; use App\Models\Asset;
use App\Models\Location;
use App\Models\Component; use App\Models\Component;
use App\Models\Category;
use App\Models\Consumable; use App\Models\Consumable;
use App\Models\License; use App\Models\License;
use App\Models\User; use App\Models\User;
@ -14,6 +16,8 @@ use App\Policies\AssetPolicy;
use App\Policies\ComponentPolicy; use App\Policies\ComponentPolicy;
use App\Policies\ConsumablePolicy; use App\Policies\ConsumablePolicy;
use App\Policies\LicensePolicy; use App\Policies\LicensePolicy;
use App\Policies\LocationPolicy;
use App\Policies\CategoryPolicy;
use App\Policies\UserPolicy; use App\Policies\UserPolicy;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\Gate;
@ -33,6 +37,8 @@ class AuthServiceProvider extends ServiceProvider
Consumable::class => ConsumablePolicy::class, Consumable::class => ConsumablePolicy::class,
License::class => LicensePolicy::class, License::class => LicensePolicy::class,
User::class => UserPolicy::class, User::class => UserPolicy::class,
Location::class => LocationPolicy::class,
Category::class => CategoryPolicy::class,
]; ];
/** /**

View file

@ -29,6 +29,7 @@
"phpdocumentor/reflection-docblock": "3.2.2", "phpdocumentor/reflection-docblock": "3.2.2",
"phpspec/prophecy": "1.6.2", "phpspec/prophecy": "1.6.2",
"pragmarx/google2fa": "^1.0", "pragmarx/google2fa": "^1.0",
"predis/predis": "^1.1",
"schuppo/password-strength": "~1.5", "schuppo/password-strength": "~1.5",
"spatie/laravel-backup": "^3.0.0", "spatie/laravel-backup": "^3.0.0",
"tecnickcom/tc-lib-barcode": "^1.15", "tecnickcom/tc-lib-barcode": "^1.15",

273
composer.lock generated
View file

@ -4,7 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0806112cf7a9396f0a7d89649ea7060b", "hash": "abe6a702f2383ae1fd4c9bbfb06c47ee",
"content-hash": "7659dd61c86bb042a246c2fa313d79a6",
"packages": [ "packages": [
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
@ -84,7 +85,7 @@
"s3", "s3",
"sdk" "sdk"
], ],
"time": "2017-09-29T19:46:41+00:00" "time": "2017-09-29 19:46:41"
}, },
{ {
"name": "aws/aws-sdk-php-laravel", "name": "aws/aws-sdk-php-laravel",
@ -140,7 +141,7 @@
"s3", "s3",
"sdk" "sdk"
], ],
"time": "2016-01-18T06:57:07+00:00" "time": "2016-01-18 06:57:07"
}, },
{ {
"name": "barryvdh/laravel-debugbar", "name": "barryvdh/laravel-debugbar",
@ -189,7 +190,7 @@
"profiler", "profiler",
"webprofiler" "webprofiler"
], ],
"time": "2017-07-21T11:56:48+00:00" "time": "2017-07-21 11:56:48"
}, },
{ {
"name": "christian-riesen/base32", "name": "christian-riesen/base32",
@ -243,7 +244,7 @@
"encode", "encode",
"rfc4648" "rfc4648"
], ],
"time": "2016-05-05T11:49:03+00:00" "time": "2016-05-05 11:49:03"
}, },
{ {
"name": "defuse/php-encryption", "name": "defuse/php-encryption",
@ -306,7 +307,7 @@
"security", "security",
"symmetric key cryptography" "symmetric key cryptography"
], ],
"time": "2017-05-18T21:28:48+00:00" "time": "2017-05-18 21:28:48"
}, },
{ {
"name": "dnoegel/php-xdg-base-dir", "name": "dnoegel/php-xdg-base-dir",
@ -339,7 +340,7 @@
"MIT" "MIT"
], ],
"description": "implementation of xdg base directory specification for php", "description": "implementation of xdg base directory specification for php",
"time": "2014-10-24T07:27:01+00:00" "time": "2014-10-24 07:27:01"
}, },
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
@ -407,7 +408,7 @@
"docblock", "docblock",
"parser" "parser"
], ],
"time": "2017-02-24T16:22:25+00:00" "time": "2017-02-24 16:22:25"
}, },
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
@ -477,7 +478,7 @@
"cache", "cache",
"caching" "caching"
], ],
"time": "2017-07-22T12:49:21+00:00" "time": "2017-07-22 12:49:21"
}, },
{ {
"name": "doctrine/collections", "name": "doctrine/collections",
@ -544,7 +545,7 @@
"collections", "collections",
"iterator" "iterator"
], ],
"time": "2017-01-03T10:49:41+00:00" "time": "2017-01-03 10:49:41"
}, },
{ {
"name": "doctrine/common", "name": "doctrine/common",
@ -617,7 +618,7 @@
"persistence", "persistence",
"spl" "spl"
], ],
"time": "2017-07-22T08:35:12+00:00" "time": "2017-07-22 08:35:12"
}, },
{ {
"name": "doctrine/dbal", "name": "doctrine/dbal",
@ -688,7 +689,7 @@
"persistence", "persistence",
"queryobject" "queryobject"
], ],
"time": "2017-07-22T20:44:48+00:00" "time": "2017-07-22 20:44:48"
}, },
{ {
"name": "doctrine/inflector", "name": "doctrine/inflector",
@ -755,7 +756,7 @@
"singularize", "singularize",
"string" "string"
], ],
"time": "2015-11-06T14:35:42+00:00" "time": "2015-11-06 14:35:42"
}, },
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
@ -809,7 +810,7 @@
"constructor", "constructor",
"instantiate" "instantiate"
], ],
"time": "2015-06-14T21:17:01+00:00" "time": "2015-06-14 21:17:01"
}, },
{ {
"name": "doctrine/lexer", "name": "doctrine/lexer",
@ -863,7 +864,7 @@
"lexer", "lexer",
"parser" "parser"
], ],
"time": "2014-09-09T13:34:57+00:00" "time": "2014-09-09 13:34:57"
}, },
{ {
"name": "erusev/parsedown", "name": "erusev/parsedown",
@ -905,7 +906,7 @@
"markdown", "markdown",
"parser" "parser"
], ],
"time": "2017-05-14T14:47:48+00:00" "time": "2017-05-14 14:47:48"
}, },
{ {
"name": "fideloper/proxy", "name": "fideloper/proxy",
@ -962,7 +963,7 @@
"proxy", "proxy",
"trusted proxy" "trusted proxy"
], ],
"time": "2017-06-15T17:19:42+00:00" "time": "2017-06-15 17:19:42"
}, },
{ {
"name": "firebase/php-jwt", "name": "firebase/php-jwt",
@ -1005,7 +1006,7 @@
], ],
"description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.",
"homepage": "https://github.com/firebase/php-jwt", "homepage": "https://github.com/firebase/php-jwt",
"time": "2016-07-18T04:51:16+00:00" "time": "2016-07-18 04:51:16"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
@ -1070,7 +1071,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2017-06-22T18:50:49+00:00" "time": "2017-06-22 18:50:49"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@ -1121,7 +1122,7 @@
"keywords": [ "keywords": [
"promise" "promise"
], ],
"time": "2016-12-20T10:07:11+00:00" "time": "2016-12-20 10:07:11"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
@ -1186,7 +1187,7 @@
"uri", "uri",
"url" "url"
], ],
"time": "2017-03-20T17:10:46+00:00" "time": "2017-03-20 17:10:46"
}, },
{ {
"name": "intervention/image", "name": "intervention/image",
@ -1256,7 +1257,7 @@
"thumbnail", "thumbnail",
"watermark" "watermark"
], ],
"time": "2017-09-21T16:29:17+00:00" "time": "2017-09-21 16:29:17"
}, },
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
@ -1299,7 +1300,7 @@
"homepage": "http://www.acci.cz" "homepage": "http://www.acci.cz"
} }
], ],
"time": "2014-04-08T15:00:19+00:00" "time": "2014-04-08 15:00:19"
}, },
{ {
"name": "jakub-onderka/php-console-highlighter", "name": "jakub-onderka/php-console-highlighter",
@ -1343,7 +1344,7 @@
"homepage": "http://www.acci.cz/" "homepage": "http://www.acci.cz/"
} }
], ],
"time": "2015-04-20T18:58:01+00:00" "time": "2015-04-20 18:58:01"
}, },
{ {
"name": "javiereguiluz/easyslugger", "name": "javiereguiluz/easyslugger",
@ -1373,7 +1374,7 @@
"MIT" "MIT"
], ],
"description": "A fast and easy to use slugger with full UTF-8 support.", "description": "A fast and easy to use slugger with full UTF-8 support.",
"time": "2015-04-12T19:57:10+00:00" "time": "2015-04-12 19:57:10"
}, },
{ {
"name": "jenssegers/rollbar", "name": "jenssegers/rollbar",
@ -1425,7 +1426,7 @@
"monitoring", "monitoring",
"rollbar" "rollbar"
], ],
"time": "2017-01-25T08:34:12+00:00" "time": "2017-01-25 08:34:12"
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
@ -1554,7 +1555,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2017-08-30T09:26:16+00:00" "time": "2017-08-30 09:26:16"
}, },
{ {
"name": "laravel/passport", "name": "laravel/passport",
@ -1618,7 +1619,7 @@
"oauth", "oauth",
"passport" "passport"
], ],
"time": "2017-07-12T20:03:53+00:00" "time": "2017-07-12 20:03:53"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
@ -1681,7 +1682,7 @@
"laravel", "laravel",
"psysh" "psysh"
], ],
"time": "2017-07-13T13:11:05+00:00" "time": "2017-07-13 13:11:05"
}, },
{ {
"name": "laravelcollective/html", "name": "laravelcollective/html",
@ -1735,7 +1736,7 @@
], ],
"description": "HTML and Form Builders for the Laravel Framework", "description": "HTML and Form Builders for the Laravel Framework",
"homepage": "http://laravelcollective.com", "homepage": "http://laravelcollective.com",
"time": "2017-08-12T15:52:38+00:00" "time": "2017-08-12 15:52:38"
}, },
{ {
"name": "lcobucci/jwt", "name": "lcobucci/jwt",
@ -1793,7 +1794,7 @@
"JWS", "JWS",
"jwt" "jwt"
], ],
"time": "2017-09-01T08:23:26+00:00" "time": "2017-09-01 08:23:26"
}, },
{ {
"name": "league/csv", "name": "league/csv",
@ -1850,7 +1851,7 @@
"read", "read",
"write" "write"
], ],
"time": "2017-07-12T07:18:20+00:00" "time": "2017-07-12 07:18:20"
}, },
{ {
"name": "league/event", "name": "league/event",
@ -1900,7 +1901,7 @@
"event", "event",
"listener" "listener"
], ],
"time": "2015-05-21T12:24:47+00:00" "time": "2015-05-21 12:24:47"
}, },
{ {
"name": "league/flysystem", "name": "league/flysystem",
@ -1983,7 +1984,7 @@
"sftp", "sftp",
"storage" "storage"
], ],
"time": "2017-08-06T17:41:04+00:00" "time": "2017-08-06 17:41:04"
}, },
{ {
"name": "league/oauth2-server", "name": "league/oauth2-server",
@ -2060,7 +2061,7 @@
"secure", "secure",
"server" "server"
], ],
"time": "2017-07-11T06:31:36+00:00" "time": "2017-07-11 06:31:36"
}, },
{ {
"name": "maknz/slack", "name": "maknz/slack",
@ -2109,7 +2110,7 @@
"laravel", "laravel",
"slack" "slack"
], ],
"time": "2015-06-03T03:35:16+00:00" "time": "2015-06-03 03:35:16"
}, },
{ {
"name": "maximebf/debugbar", "name": "maximebf/debugbar",
@ -2170,7 +2171,7 @@
"debug", "debug",
"debugbar" "debugbar"
], ],
"time": "2017-01-05T08:46:19+00:00" "time": "2017-01-05 08:46:19"
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
@ -2248,7 +2249,7 @@
"logging", "logging",
"psr-3" "psr-3"
], ],
"time": "2017-06-19T01:22:40+00:00" "time": "2017-06-19 01:22:40"
}, },
{ {
"name": "mtdowling/cron-expression", "name": "mtdowling/cron-expression",
@ -2292,7 +2293,7 @@
"cron", "cron",
"schedule" "schedule"
], ],
"time": "2017-01-23T04:29:33+00:00" "time": "2017-01-23 04:29:33"
}, },
{ {
"name": "mtdowling/jmespath.php", "name": "mtdowling/jmespath.php",
@ -2347,7 +2348,7 @@
"json", "json",
"jsonpath" "jsonpath"
], ],
"time": "2016-12-03T22:08:25+00:00" "time": "2016-12-03 22:08:25"
}, },
{ {
"name": "neitanod/forceutf8", "name": "neitanod/forceutf8",
@ -2381,7 +2382,7 @@
], ],
"description": "PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.", "description": "PHP Class Encoding featuring popular Encoding::toUTF8() function --formerly known as forceUTF8()-- that fixes mixed encoded strings.",
"homepage": "https://github.com/neitanod/forceutf8", "homepage": "https://github.com/neitanod/forceutf8",
"time": "2017-05-22T18:50:57+00:00" "time": "2017-05-22 18:50:57"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
@ -2434,7 +2435,7 @@
"datetime", "datetime",
"time" "time"
], ],
"time": "2017-01-16T07:55:07+00:00" "time": "2017-01-16 07:55:07"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@ -2485,7 +2486,7 @@
"parser", "parser",
"php" "php"
], ],
"time": "2017-09-02T17:10:46+00:00" "time": "2017-09-02 17:10:46"
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
@ -2533,7 +2534,7 @@
"pseudorandom", "pseudorandom",
"random" "random"
], ],
"time": "2017-09-27T21:40:39+00:00" "time": "2017-09-27 21:40:39"
}, },
{ {
"name": "patchwork/utf8", "name": "patchwork/utf8",
@ -2592,7 +2593,7 @@
"utf-8", "utf-8",
"utf8" "utf8"
], ],
"time": "2016-05-18T13:57:10+00:00" "time": "2016-05-18 13:57:10"
}, },
{ {
"name": "phpdocumentor/reflection-common", "name": "phpdocumentor/reflection-common",
@ -2646,7 +2647,7 @@
"reflection", "reflection",
"static analysis" "static analysis"
], ],
"time": "2017-09-11T18:02:19+00:00" "time": "2017-09-11 18:02:19"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
@ -2691,7 +2692,7 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-08T06:39:58+00:00" "time": "2017-08-08 06:39:58"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
@ -2738,7 +2739,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2017-06-03T08:32:36+00:00" "time": "2017-06-03 08:32:36"
}, },
{ {
"name": "phpseclib/phpseclib", "name": "phpseclib/phpseclib",
@ -2830,7 +2831,7 @@
"x.509", "x.509",
"x509" "x509"
], ],
"time": "2017-06-05T06:31:10+00:00" "time": "2017-06-05 06:31:10"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@ -2893,7 +2894,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2016-11-21T14:58:47+00:00" "time": "2016-11-21 14:58:47"
}, },
{ {
"name": "pragmarx/google2fa", "name": "pragmarx/google2fa",
@ -2954,7 +2955,57 @@
"google2fa", "google2fa",
"laravel" "laravel"
], ],
"time": "2016-07-18T20:25:04+00:00" "time": "2016-07-18 20:25:04"
},
{
"name": "predis/predis",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/nrk/predis.git",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1",
"reference": "f0210e38881631afeafb56ab43405a92cafd9fd1",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
},
"suggest": {
"ext-curl": "Allows access to Webdis when paired with phpiredis",
"ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol"
},
"type": "library",
"autoload": {
"psr-4": {
"Predis\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Daniele Alessandri",
"email": "suppakilla@gmail.com",
"homepage": "http://clorophilla.net"
}
],
"description": "Flexible and feature-complete Redis client for PHP and HHVM",
"homepage": "http://github.com/nrk/predis",
"keywords": [
"nosql",
"predis",
"redis"
],
"time": "2016-06-16 16:22:20"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -3004,7 +3055,7 @@
"request", "request",
"response" "response"
], ],
"time": "2016-08-06T14:39:51+00:00" "time": "2016-08-06 14:39:51"
}, },
{ {
"name": "psr/log", "name": "psr/log",
@ -3051,7 +3102,7 @@
"psr", "psr",
"psr-3" "psr-3"
], ],
"time": "2016-10-10T12:19:37+00:00" "time": "2016-10-10 12:19:37"
}, },
{ {
"name": "psy/psysh", "name": "psy/psysh",
@ -3124,7 +3175,7 @@
"interactive", "interactive",
"shell" "shell"
], ],
"time": "2017-07-29T19:30:02+00:00" "time": "2017-07-29 19:30:02"
}, },
{ {
"name": "ramsey/uuid", "name": "ramsey/uuid",
@ -3206,7 +3257,7 @@
"identifier", "identifier",
"uuid" "uuid"
], ],
"time": "2017-09-22T20:46:04+00:00" "time": "2017-09-22 20:46:04"
}, },
{ {
"name": "rollbar/rollbar", "name": "rollbar/rollbar",
@ -3256,7 +3307,7 @@
"logging", "logging",
"monitoring" "monitoring"
], ],
"time": "2016-07-05T15:50:29+00:00" "time": "2016-07-05 15:50:29"
}, },
{ {
"name": "schuppo/password-strength", "name": "schuppo/password-strength",
@ -3306,7 +3357,7 @@
"password strength", "password strength",
"validation" "validation"
], ],
"time": "2016-10-05T09:57:59+00:00" "time": "2016-10-05 09:57:59"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -3370,7 +3421,7 @@
"compare", "compare",
"equality" "equality"
], ],
"time": "2017-01-29T09:50:25+00:00" "time": "2017-01-29 09:50:25"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
@ -3422,7 +3473,7 @@
"keywords": [ "keywords": [
"diff" "diff"
], ],
"time": "2017-05-22T07:24:03+00:00" "time": "2017-05-22 07:24:03"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -3489,7 +3540,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2016-11-19T08:54:04+00:00" "time": "2016-11-19 08:54:04"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
@ -3542,7 +3593,7 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-11-19T07:33:16+00:00" "time": "2016-11-19 07:33:16"
}, },
{ {
"name": "spatie/db-dumper", "name": "spatie/db-dumper",
@ -3592,7 +3643,7 @@
"mysqldump", "mysqldump",
"spatie" "spatie"
], ],
"time": "2016-06-14T13:23:01+00:00" "time": "2016-06-14 13:23:01"
}, },
{ {
"name": "spatie/laravel-backup", "name": "spatie/laravel-backup",
@ -3655,7 +3706,7 @@
"laravel-backup", "laravel-backup",
"spatie" "spatie"
], ],
"time": "2017-02-18T09:54:12+00:00" "time": "2017-02-18 09:54:12"
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
@ -3709,7 +3760,7 @@
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2017-05-01T15:54:03+00:00" "time": "2017-05-01 15:54:03"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
@ -3777,7 +3828,7 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-09-06T16:40:18+00:00" "time": "2017-09-06 16:40:18"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
@ -3830,7 +3881,7 @@
], ],
"description": "Symfony CssSelector Component", "description": "Symfony CssSelector Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-01-02T20:31:54+00:00" "time": "2017-01-02 20:31:54"
}, },
{ {
"name": "symfony/debug", "name": "symfony/debug",
@ -3886,7 +3937,7 @@
], ],
"description": "Symfony Debug Component", "description": "Symfony Debug Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-09-01T13:23:39+00:00" "time": "2017-09-01 13:23:39"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@ -3949,7 +4000,7 @@
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
@ -3998,7 +4049,7 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
@ -4051,7 +4102,7 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-09-06T17:07:39+00:00" "time": "2017-09-06 17:07:39"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
@ -4137,7 +4188,7 @@
], ],
"description": "Symfony HttpKernel Component", "description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-09-11T16:13:23+00:00" "time": "2017-09-11 16:13:23"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
@ -4196,7 +4247,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2017-06-14T15:44:48+00:00" "time": "2017-06-14 15:44:48"
}, },
{ {
"name": "symfony/polyfill-php56", "name": "symfony/polyfill-php56",
@ -4252,7 +4303,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2017-06-14T15:44:48+00:00" "time": "2017-06-14 15:44:48"
}, },
{ {
"name": "symfony/polyfill-util", "name": "symfony/polyfill-util",
@ -4304,7 +4355,7 @@
"polyfill", "polyfill",
"shim" "shim"
], ],
"time": "2017-07-05T15:09:33+00:00" "time": "2017-07-05 15:09:33"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
@ -4353,7 +4404,7 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/psr-http-message-bridge", "name": "symfony/psr-http-message-bridge",
@ -4413,7 +4464,7 @@
"http-message", "http-message",
"psr-7" "psr-7"
], ],
"time": "2016-09-14T18:37:20+00:00" "time": "2016-09-14 18:37:20"
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
@ -4491,7 +4542,7 @@
"uri", "uri",
"url" "url"
], ],
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
@ -4556,7 +4607,7 @@
], ],
"description": "Symfony Translation Component", "description": "Symfony Translation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
@ -4624,7 +4675,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2017-08-27T14:52:21+00:00" "time": "2017-08-27 14:52:21"
}, },
{ {
"name": "tecnickcom/tc-lib-barcode", "name": "tecnickcom/tc-lib-barcode",
@ -4714,7 +4765,7 @@
"tc-lib-barcode", "tc-lib-barcode",
"upc" "upc"
], ],
"time": "2017-02-12T13:51:39+00:00" "time": "2017-02-12 13:51:39"
}, },
{ {
"name": "tecnickcom/tc-lib-color", "name": "tecnickcom/tc-lib-color",
@ -4777,7 +4828,7 @@
"tc-lib-color", "tc-lib-color",
"web" "web"
], ],
"time": "2017-02-12T12:07:38+00:00" "time": "2017-02-12 12:07:38"
}, },
{ {
"name": "tightenco/ziggy", "name": "tightenco/ziggy",
@ -4827,7 +4878,7 @@
} }
], ],
"description": "Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.", "description": "Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.",
"time": "2017-08-23T11:48:08+00:00" "time": "2017-08-23 11:48:08"
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
@ -4874,7 +4925,7 @@
], ],
"description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"time": "2016-09-20T12:50:39+00:00" "time": "2016-09-20 12:50:39"
}, },
{ {
"name": "unicodeveloper/laravel-password", "name": "unicodeveloper/laravel-password",
@ -4929,7 +4980,7 @@
"security", "security",
"unicodeveloper" "unicodeveloper"
], ],
"time": "2017-04-27T07:35:00+00:00" "time": "2017-04-27 07:35:00"
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
@ -4979,7 +5030,7 @@
"env", "env",
"environment" "environment"
], ],
"time": "2016-09-01T10:05:43+00:00" "time": "2016-09-01 10:05:43"
}, },
{ {
"name": "watson/validating", "name": "watson/validating",
@ -5029,7 +5080,7 @@
"laravel", "laravel",
"validation" "validation"
], ],
"time": "2017-08-25T02:12:38+00:00" "time": "2017-08-25 02:12:38"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
@ -5079,7 +5130,7 @@
"check", "check",
"validate" "validate"
], ],
"time": "2016-11-23T20:04:58+00:00" "time": "2016-11-23 20:04:58"
}, },
{ {
"name": "zendframework/zend-diactoros", "name": "zendframework/zend-diactoros",
@ -5131,7 +5182,7 @@
"psr", "psr",
"psr-7" "psr-7"
], ],
"time": "2017-09-13T14:47:08+00:00" "time": "2017-09-13 14:47:08"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -5192,7 +5243,7 @@
"gherkin", "gherkin",
"parser" "parser"
], ],
"time": "2016-10-30T11:50:56+00:00" "time": "2016-10-30 11:50:56"
}, },
{ {
"name": "codeception/codeception", "name": "codeception/codeception",
@ -5286,7 +5337,7 @@
"functional testing", "functional testing",
"unit testing" "unit testing"
], ],
"time": "2017-09-28T23:19:49+00:00" "time": "2017-09-28 23:19:49"
}, },
{ {
"name": "facebook/webdriver", "name": "facebook/webdriver",
@ -5338,7 +5389,7 @@
"selenium", "selenium",
"webdriver" "webdriver"
], ],
"time": "2017-04-28T14:54:49+00:00" "time": "2017-04-28 14:54:49"
}, },
{ {
"name": "fzaninotto/faker", "name": "fzaninotto/faker",
@ -5388,7 +5439,7 @@
"faker", "faker",
"fixtures" "fixtures"
], ],
"time": "2017-08-15T16:48:10+00:00" "time": "2017-08-15 16:48:10"
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
@ -5430,7 +5481,7 @@
"object", "object",
"object graph" "object graph"
], ],
"time": "2017-04-12T18:52:22+00:00" "time": "2017-04-12 18:52:22"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -5493,7 +5544,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-04-02T07:44:40+00:00" "time": "2017-04-02 07:44:40"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -5540,7 +5591,7 @@
"filesystem", "filesystem",
"iterator" "iterator"
], ],
"time": "2016-10-03T07:40:28+00:00" "time": "2016-10-03 07:40:28"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
@ -5581,7 +5632,7 @@
"keywords": [ "keywords": [
"template" "template"
], ],
"time": "2015-06-21T13:50:34+00:00" "time": "2015-06-21 13:50:34"
}, },
{ {
"name": "phpunit/php-timer", "name": "phpunit/php-timer",
@ -5630,7 +5681,7 @@
"keywords": [ "keywords": [
"timer" "timer"
], ],
"time": "2017-02-26T11:10:40+00:00" "time": "2017-02-26 11:10:40"
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
@ -5679,7 +5730,7 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2017-02-27T10:12:30+00:00" "time": "2017-02-27 10:12:30"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
@ -5761,7 +5812,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-09-24T07:23:38+00:00" "time": "2017-09-24 07:23:38"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -5820,7 +5871,7 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2017-06-30T09:13:00+00:00" "time": "2017-06-30 09:13:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",
@ -5865,7 +5916,7 @@
], ],
"description": "Looks up which function or method a line of code belongs to", "description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2017-03-04T06:30:41+00:00" "time": "2017-03-04 06:30:41"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -5915,7 +5966,7 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2016-11-26T07:53:53+00:00" "time": "2016-11-26 07:53:53"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@ -5966,7 +6017,7 @@
"keywords": [ "keywords": [
"global state" "global state"
], ],
"time": "2015-10-12T03:26:01+00:00" "time": "2015-10-12 03:26:01"
}, },
{ {
"name": "sebastian/object-enumerator", "name": "sebastian/object-enumerator",
@ -6012,7 +6063,7 @@
], ],
"description": "Traverses array structures and object graphs to enumerate all referenced objects", "description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/", "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"time": "2017-02-18T15:18:39+00:00" "time": "2017-02-18 15:18:39"
}, },
{ {
"name": "sebastian/resource-operations", "name": "sebastian/resource-operations",
@ -6054,7 +6105,7 @@
], ],
"description": "Provides a list of PHP built-in functions that operate on resources", "description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations", "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"time": "2015-07-28T20:34:47+00:00" "time": "2015-07-28 20:34:47"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -6097,7 +6148,7 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03T07:35:21+00:00" "time": "2016-10-03 07:35:21"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
@ -6148,7 +6199,7 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2017-09-19T22:47:14+00:00" "time": "2017-09-19 22:47:14"
}, },
{ {
"name": "stecman/symfony-console-completion", "name": "stecman/symfony-console-completion",
@ -6193,7 +6244,7 @@
} }
], ],
"description": "Automatic BASH completion for Symfony Console Component based applications.", "description": "Automatic BASH completion for Symfony Console Component based applications.",
"time": "2016-02-24T05:08:54+00:00" "time": "2016-02-24 05:08:54"
}, },
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
@ -6250,7 +6301,7 @@
], ],
"description": "Symfony BrowserKit Component", "description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
}, },
{ {
"name": "symfony/dom-crawler", "name": "symfony/dom-crawler",
@ -6306,7 +6357,7 @@
], ],
"description": "Symfony DomCrawler Component", "description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-01-21T17:13:55+00:00" "time": "2017-01-21 17:13:55"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@ -6361,7 +6412,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29T21:54:42+00:00" "time": "2017-07-29 21:54:42"
} }
], ],
"aliases": [], "aliases": [],

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AllowNullableDepreciationIdInModels extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('models', function (Blueprint $table) {
$table->integer('depreciation_id')->nullable()->default(null)->change();
});
Schema::table('licenses', function (Blueprint $table) {
$table->integer('depreciation_id')->nullable()->default(null)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View file

@ -398,31 +398,8 @@ Form::macro('time_display_format', function ($name = "time_display_format", $sel
/** /**
* Barcode macro * Barcode macro
* Generates the dropdown menu of available barcodes * Generates the dropdown menu of available 1D barcodes
*/ */
Form::macro('barcode_types', function ($name = "barcode_type", $selected = null, $class = null) {
$barcode_types = array(
'QRCODE'=>"QR Code",
'PDF417'=>'PDF417',
'DATAMATRIX'=>'DATAMATRIX',
'C128'=>'Code 128'
);
$select = '<select name="'.$name.'" class="'.$class.'">';
foreach ($barcode_types as $code => $codename) {
$select .= '<option value="'.$code.'"'.($selected == $code ? ' selected="selected"' : '').'>'.$codename.'</option> ';
}
$select .= '</select>';
return $select;
});
Form::macro('alt_barcode_types', function ($name = "alt_barcode", $selected = null, $class = null) { Form::macro('alt_barcode_types', function ($name = "alt_barcode", $selected = null, $class = null) {
$barcode_types = array( $barcode_types = array(
@ -445,6 +422,10 @@ Form::macro('alt_barcode_types', function ($name = "alt_barcode", $selected = nu
}); });
/**
* Barcode macro
* Generates the dropdown menu of available 2D barcodes
*/
Form::macro('barcode_types', function ($name = "barcode_type", $selected = null, $class = null) { Form::macro('barcode_types', function ($name = "barcode_type", $selected = null, $class = null) {
$barcode_types = array( $barcode_types = array(

View file

@ -29,7 +29,7 @@
<span class="btn btn-info fileinput-button"> <span class="btn btn-info fileinput-button">
<span>Select Import File...</span> <span>Select Import File...</span>
<!-- The file input field used as target for the file upload widget --> <!-- The file input field used as target for the file upload widget -->
<input id="fileupload" type="file" name="files[]" data-url="/api/v1/imports" accept="text/csv"> <input id="fileupload" type="file" name="files[]" data-url="{{ route('api.imports.index') }}" accept="text/csv">
</span> </span>
</div> </div>
<div class="col-md-9" v-show="progress.visible" style="padding-bottom:20px"> <div class="col-md-9" v-show="progress.visible" style="padding-bottom:20px">

View file

@ -125,7 +125,7 @@
@if ($license->manufacturer) @if ($license->manufacturer)
<tr> <tr>
<td>{{ trans('admin/hardware/form.manufacturer') }}</td> <td>{{ trans('admin/hardware/form.manufacturer') }}</td>
<td> <td><p style="line-height: 23px;">
@can('view', \App\Models\Manufacturer::class) @can('view', \App\Models\Manufacturer::class)
<a href="{{ route('manufacturers.show', $license->manufacturer->id) }}"> <a href="{{ route('manufacturers.show', $license->manufacturer->id) }}">
{{ $license->manufacturer->name }} {{ $license->manufacturer->name }}
@ -135,20 +135,23 @@
@endcan @endcan
@if ($license->manufacturer->url) @if ($license->manufacturer->url)
<br><i class="fa fa-globe"></i> <a href="{{ $license->manufacturer->url }}">{{ $license->manufacturer->url }}</a> <br><i class="fa fa-globe"></i> <a href="{{ $license->manufacturer->url }}" rel="noopener">{{ $license->manufacturer->url }}</a>
@endif @endif
@if ($license->manufacturer->support_url) @if ($license->manufacturer->support_url)
<br><i class="fa fa-life-ring"></i> <a href="{{ $license->manufacturer->support_url }}">{{ $license->manufacturer->support_url }}</a> <br><i class="fa fa-life-ring"></i>
<a href="{{ $license->manufacturer->support_url }}" rel="noopener">{{ $license->manufacturer->support_url }}</a>
@endif @endif
@if ($license->manufacturer->support_phone) @if ($license->manufacturer->support_phone)
<br><i class="fa fa-phone"></i> {{ $license->manufacturer->support_phone }} <br><i class="fa fa-phone"></i>
<a href="tel:{{ $license->manufacturer->support_phone }}">{{ $license->manufacturer->support_phone }}</a>
@endif @endif
@if ($license->manufacturer->support_email) @if ($license->manufacturer->support_email)
<br><i class="fa fa-envelope"></i> <a href="mailto:{{ $license->manufacturer->support_email }}">{{ $license->manufacturer->support_email }}</a> <br><i class="fa fa-envelope"></i> <a href="mailto:{{ $license->manufacturer->support_email }}">{{ $license->manufacturer->support_email }}</a>
@endif @endif
</p>
</td> </td>
</tr> </tr>
@endif @endif

View file

@ -39,14 +39,14 @@ spin[3]="/"
# Debian/Ubuntu friendly f(x)s # Debian/Ubuntu friendly f(x)s
progress () { progress () {
while kill -0 $pid > /dev/null 2>&1 echo -n " "
do while kill -0 "$pid" > /dev/null 2>&1; do
for i in "${spin[@]}" for i in "${spin[@]}"; do
do
echo -ne "\b$i" echo -ne "\b$i"
sleep .1 sleep .1
done done
done done
echo ""
} }
setvhdebian () { setvhdebian () {
@ -65,7 +65,6 @@ setvhdebian () {
echo " CustomLog /var/log/apache2/access.log combined" echo " CustomLog /var/log/apache2/access.log combined"
echo "</VirtualHost>" echo "</VirtualHost>"
} >> $apachefile } >> $apachefile
echo >> $hosts "127.0.0.1 $hostname $fqdn"
log "a2ensite $name.conf" log "a2ensite $name.conf"
} }
@ -100,30 +99,27 @@ installsnipeit () {
log "git clone https://github.com/snipe/snipe-it $webdir/$name" log "git clone https://github.com/snipe/snipe-it $webdir/$name"
echo "* Configuring .env file." echo "* Configuring .env file."
cp $webdir/$name/.env.example $webdir/$name/.env cp "$webdir/$name/.env.example" "$webdir/$name/.env"
sed -i '1 i\#Created By Snipe-it Installer' $webdir/$name/.env sed -i '1 i\#Created By Snipe-it Installer' "$webdir/$name/.env"
sed -i 's,^\(APP_TIMEZONE=\).*,\1'$tzone',' $webdir/$name/.env sed -i 's,^\(APP_TIMEZONE=\).*,\1'$tzone',' "$webdir/$name/.env"
sed -i 's,^\(DB_HOST=\).*,\1'localhost',' $webdir/$name/.env sed -i 's,^\(DB_HOST=\).*,\1'localhost',' "$webdir/$name/.env"
sed -i 's,^\(DB_DATABASE=\).*,\1'snipeit',' $webdir/$name/.env sed -i 's,^\(DB_DATABASE=\).*,\1'snipeit',' "$webdir/$name/.env"
sed -i 's,^\(DB_USERNAME=\).*,\1'snipeit',' $webdir/$name/.env sed -i 's,^\(DB_USERNAME=\).*,\1'snipeit',' "$webdir/$name/.env"
sed -i 's,^\(DB_PASSWORD=\).*,\1'$mysqluserpw',' $webdir/$name/.env sed -i 's,^\(DB_PASSWORD=\).*,\1'$mysqluserpw',' "$webdir/$name/.env"
sed -i 's,^\(APP_URL=\).*,\1'http://$fqdn',' $webdir/$name/.env sed -i 's,^\(APP_URL=\).*,\1'http://$fqdn',' "$webdir/$name/.env"
echo "* Installing and running composer." echo "* Installing and running composer."
cd $webdir/$name/ cd "$webdir/$name/"
curl -sS https://getcomposer.org/installer | php curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source php composer.phar install --no-dev --prefer-source
echo "* Setting permissions." echo "* Setting permissions."
chmod_dirs=( "$webdir/$name/storage" ) for chmod_dir in "$webdir/$name/storage" "$webdir/$name/storage/private_uploads" "$webdir/$name/public/uploads"; do
chmod_dirs+=( "$webdir/$name/storage/private_uploads" )
chmod_dirs+=( "$webdir/$name/public/uploads" )
for chmod_dir in "${chmod_dirs[@]}"
do
chmod -R 755 "$chmod_dir" chmod -R 755 "$chmod_dir"
done done
chown -R $ownergroup $webdir/$name
chown -R "$ownergroup" "$webdir/$name"
echo "* Generating the application key." echo "* Generating the application key."
log "php artisan key:generate --force" log "php artisan key:generate --force"
@ -135,8 +131,7 @@ installsnipeit () {
(crontab -l ; echo "* * * * * /usr/bin/php $webdir/$name/artisan schedule:run >> /dev/null 2>&1") | crontab - (crontab -l ; echo "* * * * * /usr/bin/php $webdir/$name/artisan schedule:run >> /dev/null 2>&1") | crontab -
} }
#CentOS Friendly f(x)s isinstalled () {
function isinstalled {
if yum list installed "$@" >/dev/null 2>&1; then if yum list installed "$@" >/dev/null 2>&1; then
true true
else else
@ -144,8 +139,8 @@ function isinstalled {
fi fi
} }
if [ -f /etc/lsb-release ]; then if [[ -f /etc/lsb-release || -f /etc/debian_version ]]; then
distro="$(lsb_release -s -i )" distro="$(lsb_release -s -i)"
version="$(lsb_release -s -r)" version="$(lsb_release -s -r)"
codename="$(lsb_release -c -s)" codename="$(lsb_release -c -s)"
elif [ -f /etc/os-release ]; then elif [ -f /etc/os-release ]; then
@ -176,15 +171,15 @@ echo ""
shopt -s nocasematch shopt -s nocasematch
case $distro in case $distro in
*Ubuntu*) *Ubuntu*)
echo " The installer has detected Ubuntu version $version as the OS." echo " The installer has detected $distro version $version codename $codename."
distro=ubuntu distro=ubuntu
;; ;;
*Debian*) *Debian*)
echo " The installer has detected Debian version $version as the OS." echo " The installer has detected $distro version $version codename $codename."
distro=debian distro=debian
;; ;;
*centos*|*redhat*|*ol*|*rhel*) *centos*|*redhat*|*ol*|*rhel*)
echo " The installer has detected $distro version $version as the OS." echo " The installer has detected $distro version $version."
distro=centos distro=centos
;; ;;
*) *)
@ -195,7 +190,7 @@ esac
shopt -u nocasematch shopt -u nocasematch
echo -n " Q. What is the FQDN of your server? ($fqdn): " echo -n " Q. What is the FQDN of your server? ($fqdn): "
read fqdn read -r fqdn
if [ -z "$fqdn" ]; then if [ -z "$fqdn" ]; then
fqdn="$(hostname --fqdn)" fqdn="$(hostname --fqdn)"
fi fi
@ -205,17 +200,17 @@ echo ""
ans=default ans=default
until [[ $ans == "yes" ]] || [[ $ans == "no" ]]; do until [[ $ans == "yes" ]] || [[ $ans == "no" ]]; do
echo -n " Q. Do you want to automatically create the database user password? (y/n) " echo -n " Q. Do you want to automatically create the database user password? (y/n) "
read setpw read -r setpw
case $setpw in case $setpw in
[yY] | [yY][Ee][Ss] ) [yY] | [yY][Ee][Ss] )
mysqluserpw="$(echo `< /dev/urandom tr -dc _A-Za-z-0-9 | head -c16`)" mysqluserpw="$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c16; echo)"
echo "" echo ""
ans="yes" ans="yes"
;; ;;
[nN] | [n|N][O|o] ) [nN] | [n|N][O|o] )
echo -n " Q. What do you want your snipeit user password to be?" echo -n " Q. What do you want your snipeit user password to be?"
read -s mysqluserpw read -rs mysqluserpw
echo "" echo ""
ans="no" ans="no"
;; ;;
@ -225,8 +220,6 @@ esac
done done
#TODO: Lets not install snipeit application under root #TODO: Lets not install snipeit application under root
#TODO: Make progress tracker go on the same line of the step being run
#TODO: Progress tracker on each step
case $distro in case $distro in
debian) debian)
@ -236,15 +229,15 @@ case $distro in
ownergroup=www-data:www-data ownergroup=www-data:www-data
tzone=$(cat /etc/timezone) tzone=$(cat /etc/timezone)
echo "* Updating with apt-get update." echo -n "* Updating with apt-get update."
log "apt-get update" & pid=$! log "apt-get update" & pid=$!
progress progress
echo "* Upgrading packages with apt-get upgrade." echo -n "* Upgrading packages with apt-get upgrade."
log "apt-get -y upgrade" & pid=$! log "apt-get -y upgrade" & pid=$!
progress progress
echo "* Installing Apache httpd, PHP, MariaDB and other requirements." echo -n "* Installing Apache httpd, PHP, MariaDB and other requirements."
log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client apache2 libapache2-mod-php php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath curl git unzip" & pid=$! log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client apache2 libapache2-mod-php php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath curl git unzip" & pid=$!
progress progress
@ -253,6 +246,54 @@ case $distro in
echo "* Creating the new virtual host in Apache." echo "* Creating the new virtual host in Apache."
setvhdebian setvhdebian
echo "* Setting up hosts file."
echo >> $hosts "127.0.0.1 $hostname $fqdn"
echo "* Securing MariaDB."
/usr/bin/mysql_secure_installation
echo "* Creating MariaDB Database/User."
echo "* Please Input your MariaDB root password:"
mysql -u root -p --execute="CREATE DATABASE snipeit;GRANT ALL PRIVILEGES ON snipeit.* TO snipeit@localhost IDENTIFIED BY '$mysqluserpw';"
installsnipeit
echo "* Restarting Apache httpd."
log "service apache2 restart"
elif [[ "$version" =~ ^8 ]]; then
##################################### Install for Debian 8 ##############################################
webdir=/var/www
ownergroup=www-data:www-data
tzone=$(cat /etc/timezone)
echo "* Adding MariaDB and ppa:ondrej/php repositories."
log "apt-get install -y software-properties-common"
log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db"
log "add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/debian $codename main'"
#PHP7 repository
log "apt-get install -y apt-transport-https"
log "wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg"
echo "deb https://packages.sury.org/php/ $codename main" > /etc/apt/sources.list.d/php.list
echo -n "* Updating with apt-get update."
log "apt-get update" & pid=$!
progress
echo -n "* Upgrading packages with apt-get upgrade."
log "apt-get -y upgrade" & pid=$!
progress
echo -n "* Installing Apache httpd, PHP, MariaDB and other requirements."
log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" & pid=$!
progress
a2enmod rewrite
echo "* Creating the new virtual host in Apache."
setvhdebian
echo "* Setting up hosts file."
echo >> $hosts "127.0.0.1 $hostname $fqdn" echo >> $hosts "127.0.0.1 $hostname $fqdn"
echo "* Securing MariaDB." echo "* Securing MariaDB."
@ -268,8 +309,8 @@ case $distro in
log "service apache2 restart" log "service apache2 restart"
else else
echo "Unsupported Debian version. Version found: " $version echo "Unsupported Debian version. Version found: $version"
return 1 exit 1
fi fi
;; ;;
ubuntu) ubuntu)
@ -280,20 +321,19 @@ case $distro in
tzone=$(cat /etc/timezone) tzone=$(cat /etc/timezone)
echo "* Adding MariaDB repository." echo "* Adding MariaDB repository."
log "apt-get install software-properties-common"
log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8" log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8"
log "add-apt-repository 'deb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu $codename main'" log "add-apt-repository 'deb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu $codename main'"
echo "* Updating with apt-get update." echo -n "* Updating with apt-get update."
log "apt-get update" & pid=$! log "apt-get update" & pid=$!
#https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_What_can_be_done_when_the_dpkg_lock_is_held.3F
#[ -f /var/lib/dpkg/lock ] && rm -f /var/lib/dpkg/lock
progress progress
echo "* Upgrading packages with apt-get upgrade." echo -n "* Upgrading packages with apt-get upgrade."
log "apt-get -y upgrade" & pid=$! log "apt-get -y upgrade" & pid=$!
progress progress
echo "* Installing Apache httpd, PHP, MariaDB and other requirements." echo -n "* Installing Apache httpd, PHP, MariaDB and other requirements."
log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client apache2 libapache2-mod-php php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath curl git unzip" & pid=$! log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client apache2 libapache2-mod-php php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml php-bcmath curl git unzip" & pid=$!
progress progress
@ -304,6 +344,9 @@ case $distro in
echo "* Creating the new virtual host in Apache." echo "* Creating the new virtual host in Apache."
setvhdebian setvhdebian
echo "* Setting up hosts file."
echo >> $hosts "127.0.0.1 $hostname $fqdn"
echo "* Starting MariaDB." echo "* Starting MariaDB."
log "service mysql start" log "service mysql start"
@ -326,22 +369,21 @@ case $distro in
tzone=$(cat /etc/timezone) tzone=$(cat /etc/timezone)
echo "* Adding MariaDB and ppa:ondrej/php repositories." echo "* Adding MariaDB and ppa:ondrej/php repositories."
log "apt-get install software-properties-common"
log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db" log "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db"
log "add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu $codename main'" log "add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu $codename main'"
#PHP7 repository #PHP7 repository
log "add-apt-repository ppa:ondrej/php -y" log "add-apt-repository ppa:ondrej/php -y"
echo "* Updating with apt-get update." echo -n "* Updating with apt-get update."
log "apt-get update" & pid=$! log "apt-get update" & pid=$!
#https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_What_can_be_done_when_the_dpkg_lock_is_held.3F
#[ -f /var/lib/dpkg/lock ] && rm -f /var/lib/dpkg/lock
progress progress
echo "* Upgrading packages with apt-get upgrade." echo -n "* Upgrading packages with apt-get upgrade."
log "apt-get -y upgrade" & pid=$! log "apt-get -y upgrade" & pid=$!
progress progress
echo "* Installing Apache httpd, PHP, MariaDB and other requirements." echo -n "* Installing Apache httpd, PHP, MariaDB and other requirements."
log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" & pid=$! log "DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server mariadb-client php7.1 php7.1-mcrypt php7.1-curl php7.1-mysql php7.1-gd php7.1-ldap php7.1-zip php7.1-mbstring php7.1-xml php7.1-bcmath curl git unzip" & pid=$!
progress progress
@ -352,6 +394,9 @@ case $distro in
echo "* Creating the new virtual host in Apache." echo "* Creating the new virtual host in Apache."
setvhdebian setvhdebian
echo "* Setting up hosts file."
echo >> $hosts "127.0.0.1 $hostname $fqdn"
echo "* Starting MariaDB." echo "* Starting MariaDB."
log "service mysql start" log "service mysql start"
@ -368,8 +413,8 @@ case $distro in
log "service apache2 restart" log "service apache2 restart"
else else
echo "Unsupported Ubuntu version. Version found: " $version echo "Unsupported Ubuntu version. Version found: $version"
return 1 exit 1
fi fi
;; ;;
centos) centos)
@ -398,7 +443,7 @@ case $distro in
echo "* Installing Apache httpd, PHP, MariaDB and other requirements." echo "* Installing Apache httpd, PHP, MariaDB and other requirements."
PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml" PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml"
for p in $PACKAGES;do for p in $PACKAGES; do
if isinstalled "$p"; then if isinstalled "$p"; then
echo " * $p already installed" echo " * $p already installed"
else else
@ -418,15 +463,13 @@ case $distro in
echo "* Please Input your MariaDB root password: " echo "* Please Input your MariaDB root password: "
mysql -u root -p --execute="CREATE DATABASE snipeit;GRANT ALL PRIVILEGES ON snipeit.* TO snipeit@localhost IDENTIFIED BY '$mysqluserpw';" mysql -u root -p --execute="CREATE DATABASE snipeit;GRANT ALL PRIVILEGES ON snipeit.* TO snipeit@localhost IDENTIFIED BY '$mysqluserpw';"
#Create the new virtual host in Apache and enable rewrite
echo "* Creating the new virtual host in Apache." echo "* Creating the new virtual host in Apache."
setvhcentos setvhcentos
echo "* Setting up hosts file." echo "* Setting up hosts file."
echo >> $hosts "127.0.0.1 $hostname $fqdn" echo >> $hosts "127.0.0.1 $hostname $fqdn"
/sbin/service iptables status >/dev/null 2>&1 if /sbin/service iptables status >/dev/null 2>&1; then
if [ $? = 0 ]; then
echo "* Configuring iptables." echo "* Configuring iptables."
iptables -I INPUT 1 -p tcp -m tcp --dport 80 -j ACCEPT iptables -I INPUT 1 -p tcp -m tcp --dport 80 -j ACCEPT
iptables -I INPUT 1 -p tcp -m tcp --dport 443 -j ACCEPT iptables -I INPUT 1 -p tcp -m tcp --dport 443 -j ACCEPT
@ -453,7 +496,7 @@ case $distro in
echo "* Installing Apache httpd, PHP, MariaDB and other requirements." echo "* Installing Apache httpd, PHP, MariaDB and other requirements."
PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml" PACKAGES="httpd mariadb-server git unzip php71u php71u-mysqlnd php71u-bcmath php71u-cli php71u-common php71u-embedded php71u-gd php71u-mbstring php71u-mcrypt php71u-ldap php71u-json php71u-simplexml"
for p in $PACKAGES;do for p in $PACKAGES; do
if isinstalled "$p"; then if isinstalled "$p"; then
echo " * $p already installed" echo " * $p already installed"
else else
@ -474,7 +517,6 @@ case $distro in
mysql -u root -p --execute="CREATE DATABASE snipeit;GRANT ALL PRIVILEGES ON snipeit.* TO snipeit@localhost IDENTIFIED BY '$mysqluserpw';" mysql -u root -p --execute="CREATE DATABASE snipeit;GRANT ALL PRIVILEGES ON snipeit.* TO snipeit@localhost IDENTIFIED BY '$mysqluserpw';"
#TODO make sure the apachefile doesnt exist isnt already in there #TODO make sure the apachefile doesnt exist isnt already in there
#Create the new virtual host in Apache and enable rewrite
echo "* Creating the new virtual host in Apache." echo "* Creating the new virtual host in Apache."
setvhcentos setvhcentos
@ -498,53 +540,53 @@ case $distro in
log "systemctl restart httpd.service" log "systemctl restart httpd.service"
else else
echo "Unsupported CentOS version. Version found: " $version echo "Unsupported CentOS version. Version found: $version"
return 1 exit 1
fi fi
esac esac
setupmail=default setupmail=default
until [[ $setupmail == "yes" ]] || [[ $setupmail == "no" ]]; do until [[ $setupmail == "yes" ]] || [[ $setupmail == "no" ]]; do
echo -n " Q. Do you want to configure mail server settings? (y/n) " echo -n " Q. Do you want to configure mail server settings? (y/n) "
read setupmail read -r setupmail
case $setupmail in case $setupmail in
[yY] | [yY][Ee][Ss] ) [yY] | [yY][Ee][Ss] )
echo -n " Outgoing mailserver address:" echo -n " Outgoing mailserver address:"
read mailhost read -r mailhost
sed -i 's,^\(MAIL_HOST=\).*,\1'$mailhost',' $webdir/$name/.env sed -i 's,^\(MAIL_HOST=\).*,\1'$mailhost',' "$webdir/$name/.env"
echo -n " Server port number:" echo -n " Server port number:"
read mailport read -r mailport
sed -i 's,^\(MAIL_PORT=\).*,\1'$mailport',' $webdir/$name/.env sed -i 's,^\(MAIL_PORT=\).*,\1'$mailport',' "$webdir/$name/.env"
echo -n " Username:" echo -n " Username:"
read mailusername read -r mailusername
sed -i 's,^\(MAIL_USERNAME=\).*,\1'$mailusername',' $webdir/$name/.env sed -i 's,^\(MAIL_USERNAME=\).*,\1'$mailusername',' "$webdir/$name/.env"
echo -n " Password:" echo -n " Password:"
read mailpassword read -rs mailpassword
sed -i 's,^\(MAIL_PASSWORD=\).*,\1'$mailpassword',' $webdir/$name/.env sed -i 's,^\(MAIL_PASSWORD=\).*,\1'$mailpassword',' "$webdir/$name/.env"
echo -n " Encryption(null/TLS/SSL):" echo -n " Encryption(null/TLS/SSL):"
read mailencryption read -r mailencryption
sed -i 's,^\(MAIL_ENCRYPTION=\).*,\1'$mailencryption',' $webdir/$name/.env sed -i 's,^\(MAIL_ENCRYPTION=\).*,\1'$mailencryption',' "$webdir/$name/.env"
echo -n " From address:" echo -n " From address:"
read mailfromaddr read -r mailfromaddr
sed -i 's,^\(MAIL_FROM_ADDR=\).*,\1'$mailfromaddr',' $webdir/$name/.env sed -i 's,^\(MAIL_FROM_ADDR=\).*,\1'$mailfromaddr',' "$webdir/$name/.env"
echo -n " From name:" echo -n " From name:"
read mailfromname read -r mailfromname
sed -i 's,^\(MAIL_FROM_NAME=\).*,\1'$mailfromname',' $webdir/$name/.env sed -i 's,^\(MAIL_FROM_NAME=\).*,\1'$mailfromname',' "$webdir/$name/.env"
echo -n " Reply to address:" echo -n " Reply to address:"
read mailreplytoaddr read -r mailreplytoaddr
sed -i 's,^\(MAIL_REPLYTO_ADDR=\).*,\1'$mailreplytoaddr',' $webdir/$name/.env sed -i 's,^\(MAIL_REPLYTO_ADDR=\).*,\1'$mailreplytoaddr',' "$webdir/$name/.env"
echo -n " Reply to name:" echo -n " Reply to name:"
read mailreplytoname read -r mailreplytoname
sed -i 's,^\(MAIL_REPLYTO_NAME=\).*,\1'$mailreplytoname',' $webdir/$name/.env sed -i 's,^\(MAIL_REPLYTO_NAME=\).*,\1'$mailreplytoname',' "$webdir/$name/.env"
setupmail="yes" setupmail="yes"
;; ;;
[nN] | [n|N][O|o] ) [nN] | [n|N][O|o] )