From: Vincent Vanwaelscappel Date: Mon, 15 Jun 2020 18:29:08 +0000 (+0200) Subject: wip #3707 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=12666c3227d7e4845d97d3a1a606f0e8d01ad6f5;p=extranet.git wip #3707 @1 --- diff --git a/app/Console/Commands/ExtranetMigration.php b/app/Console/Commands/ExtranetMigration.php index 9d60829..bca20ea 100644 --- a/app/Console/Commands/ExtranetMigration.php +++ b/app/Console/Commands/ExtranetMigration.php @@ -15,6 +15,7 @@ class ExtranetMigration extends CubistCommand { protected $signature = 'extranet:importfromv1'; protected $description = 'Migrate data from Extranet V1'; + protected $_wsRanks = []; public function handle() { @@ -68,7 +69,7 @@ class ExtranetMigration extends CubistCommand 'site' => 'website']; Company::query()->truncate(); - foreach (DB::table('extranet.entreprises')->get() as $e) { + foreach (DB::table('extranet_clean.entreprises')->get() as $e) { $c = new Company(); foreach ($map as $old => $new) { $c->setAttribute($new, $e->$old); @@ -79,7 +80,10 @@ class ExtranetMigration extends CubistCommand $c->setAttribute('address', ['address' => $e->adresse, 'postcode' => $e->code_postal, 'city' => $e->ville, 'country' => $e->pays]); $c->setAttribute('created_at', new \DateTime('@' . $e->date_creation)); $c->save(); + + $this->_wsRanks[$e->entreprise_id] = $e->ws_grade; } + } protected function importUsers() @@ -96,11 +100,26 @@ class ExtranetMigration extends CubistCommand 'enabled' => 'enabled', ]; + $extgrades = ['0' => 2, '0.5' => 5, '1' => 3, '2' => 1, '3' => 13]; + $wsgrades = ['1' => 7, '2' => 8, '3' => 10, '4' => 11, '5' => 9]; + //$hf=[12]; + + $roles = []; + User::query()->truncate(); - foreach (DB::table('extranet.utilisateurs')->get() as $e) { + foreach (DB::table('extranet_clean.utilisateurs')->get() as $e) { if ($e->utilisateur_id == 0) { continue; } + + if ($e->entreprise == 1880) { + $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => 12, 'model_type' => 'App\Models\User']; + } + if ($this->_wsRanks[$e->entreprise] > 0) { + $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => $wsgrades[$this->_wsRanks[$e->entreprise]], 'model_type' => 'App\Models\User']; + } + $roles[] = ['model_id' => $e->utilisateur_id, 'role_id' => $extgrades[$e->grade], 'model_type' => 'App\Models\User']; + $u = new User(); foreach ($map as $old => $new) { $u->setAttribute($new, $e->$old); @@ -110,5 +129,8 @@ class ExtranetMigration extends CubistCommand $u->setAttribute('created_at', new \DateTime('@' . $e->date_creation)); $u->save(); } + + DB::table('extranet_users.model_has_roles')->truncate(); + DB::table('extranet_users.model_has_roles')->insert($roles); } } diff --git a/app/Models/Company.php b/app/Models/Company.php deleted file mode 100644 index 15a94b9..0000000 --- a/app/Models/Company.php +++ /dev/null @@ -1,70 +0,0 @@ - 'company', - 'singular' => 'company', - 'plural' => 'companies']; - - public function setFields() - { - parent::setFields(); - - $this->addField(['name' => 'name', - 'label' => 'Company name', - 'type' => 'Text', - 'column' => true, - 'tab' => 'Details']); - - $this->addField(['name' => 'address', - 'type' => 'BunchOfFields', - 'bunch' => Address::class, - 'label' => 'Address', - 'tab' => 'Addresses']); - - $this->addField(['name' => 'billing_address', - 'type' => 'BunchOfFields', - 'bunch' => Address::class, - 'label' => 'Billing address', - 'tab' => 'Addresses']); - - $this->addField(['name' => 'vat_number', - 'type' => 'VATNumber', - 'label' => 'VAT number', - 'tab' => 'Details']); - - $this->addField(['name' => 'type', - 'type' => 'SelectFromArray', - 'label' => 'Type', - 'options' => [ - 0 => 'Undefined', - 1 => 'Very small company', - 2 => 'Startup', - 3 => 'Small / medium company', - 4 => 'Agency', - 5 => 'Big company', - 6 => 'Government / Public institution' - ], - 'tab' => 'Details' - ] - ); - - $this->addField(['name' => 'admin', - 'type' => 'SelectFromModel', - 'optionsmodel' => User::class, - 'attribute' => 'nameWithCompany', - 'label' => 'Administrator', - 'tab' => 'Details']); - - $this->addField(['name' => 'website', - 'type' => 'URL', - 'label' => 'Website', - 'tab' => 'Details']); - } -} diff --git a/app/Models/User.php b/app/Models/User.php index 396e3c3..1f4241a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,84 +2,7 @@ namespace App\Models; -use App\SubForms\Address; -use Cubist\Backpack\app\Magic\Models\CubistMagicAuthenticatable; - -class User extends CubistMagicAuthenticatable +class User extends \Cubedesigners\Userdatabase\User { - protected $table = 'user'; - protected $_options = ['name' => 'users', - 'singular' => 'user', - 'plural' => 'users']; - protected static $_companyNames = null; - - public function setFields() - { - parent::setFields(); - - $this->addField(['name' => 'firstname', - 'label' => 'Firstname', - 'type' => 'Text', - 'column' => true, - 'tab' => 'Contact']); - - $this->addField(['name' => 'lastname', - 'label' => 'Lastname', - 'type' => 'Text', - 'column' => true, - 'tab' => 'Contact']); - - $this->addField(['name' => 'company', - 'label' => 'Company', - 'type' => 'SelectFromModel', - 'optionsmodel' => Company::class, - 'tab' => 'Contact' - ]); - - $this->addField(['name' => 'address', - 'type' => 'BunchOfFields', - 'bunch' => Address::class, - 'label' => 'Address', - 'tab' => 'Contact']); - - $this->addField(['name' => 'phone', - 'label' => 'Phone', - 'type' => 'Phone', - 'tab' => 'Contact']); - - $this->addField(['name' => 'mobile', - 'label' => 'Mobile', - 'type' => 'Phone', - 'tab' => 'Contact']); - - $this->addField(['name' => 'locale', - 'label' => 'Locale', - 'type' => 'Locale', - 'tab' => 'Settings']); - } - - public function getNameWithCompanyAttribute() - { - $name = trim($this->firstname . ' ' . $this->lastname); - if ($name === '') { - return $this->companyName; - } - return $name . ' (' . $this->companyName . ')'; - } - - public function getCompanyNameAttribute() - { - return self::_getCompanyNames($this->company); - } - protected static function _getCompanyNames($id = null) - { - if (null === self::$_companyNames) { - self::$_companyNames = Company::all()->pluck('name', 'id')->toArray(); - } - if (null === $id) { - return self::$_companyNames; - } - return self::$_companyNames[$id]; - } } diff --git a/app/SubForms/Address.php b/app/SubForms/Address.php deleted file mode 100644 index 2b78b42..0000000 --- a/app/SubForms/Address.php +++ /dev/null @@ -1,30 +0,0 @@ -addField(['name' => 'address', - 'label' => 'Address', - 'type' => 'Textarea']); - - $this->addField(['name' => 'postcode', - 'label' => 'Postcode', - 'type' => 'Postcode']); - - $this->addField(['name' => 'city', - 'label' => 'City', - 'type' => 'Text']); - - $this->addField(['name' => 'country', - 'label' => 'Country', - 'type' => 'Country']); - } -} diff --git a/composer.json b/composer.json index a3e985e..e562425 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ "license": "MIT", "require": { "php": ">=7.4", + "cubedesigners/userdatabase": "dev-master", "cubist/cms-back": "dev-master", "league/csv": "^9.6" }, diff --git a/composer.lock b/composer.lock index 3b588c0..5b03da9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3495a7d0634811e7d9bf5cb4b6bb58fe", + "content-hash": "e1a650cfe76da347d3b5dce785fe4f61", "packages": [ { "name": "backpack/backupmanager", @@ -856,6 +856,47 @@ ], "time": "2017-03-13T09:14:27+00:00" }, + { + "name": "calebporzio/parental", + "version": "v0.10.0", + "source": { + "type": "git", + "url": "https://github.com/calebporzio/parental.git", + "reference": "6cdbcc7c62e9bb8dcf817a7ac451e8b2d851a00f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/calebporzio/parental/zipball/6cdbcc7c62e9bb8dcf817a7ac451e8b2d851a00f", + "reference": "6cdbcc7c62e9bb8dcf817a7ac451e8b2d851a00f", + "shasum": "" + }, + "require": { + "illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0.0|^7.0.0", + "illuminate/events": "~5.6.0|~5.7.0|~5.8.0|^6.0.0|^7.0.0" + }, + "require-dev": { + "orchestra/testbench": "~3.6.0|~3.7.0|~3.8.0|^4.0|^5.0", + "phpunit/phpunit": "^7.0|^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Parental\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Caleb Porzio", + "email": "calebporzio@gmail.com" + } + ], + "description": "A simple eloquent trait that allows relationships to be accessed through child models.", + "time": "2020-03-03T13:45:17+00:00" + }, { "name": "chrisjean/php-ico", "version": "1.0.4", @@ -1023,19 +1064,54 @@ ], "time": "2020-03-03T09:01:46+00:00" }, + { + "name": "cubedesigners/userdatabase", + "version": "dev-master", + "source": { + "type": "git", + "url": "git://git.cubedesigners.com/cubedesigners_userdatabase.git", + "reference": "15643e94b45f7fb59ca840d97e8b80db0e760dc8" + }, + "dist": { + "type": "tar", + "url": "https://composer.cubedesigners.com/dist/cubedesigners/userdatabase/cubedesigners-userdatabase-dev-master-3442d1.tar", + "reference": "15643e94b45f7fb59ca840d97e8b80db0e760dc8", + "shasum": "39671c0dfd70aa5e4b7a7748b4ff4d99db20cc1a" + }, + "require": { + "cubist/cms-back": "dev-master" + }, + "type": "library", + "autoload": { + "psr-0": { + "Cubedesigners\\Userdatabase\\": "src" + } + }, + "license": [ + "proprietary" + ], + "authors": [ + { + "name": "Vincent Vanwaelscappel", + "email": "vincent@cubedesigners.com" + } + ], + "description": "Cubedesigners common users database", + "time": "2020-06-15T16:56:29+00:00" + }, { "name": "cubist/cms-back", "version": "dev-master", "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_cms-back.git", - "reference": "17f840dee7307d6482d4c632251b6e15437401e9" + "reference": "a94f165f55e150ea4ee7236c1afc296e8bbf91bf" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-a8c512.tar", - "reference": "17f840dee7307d6482d4c632251b6e15437401e9", - "shasum": "76729d83b194f4d8adfda83b188ecc41a8fc0ccc" + "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-master-5725ac.tar", + "reference": "a94f165f55e150ea4ee7236c1afc296e8bbf91bf", + "shasum": "e62fd265417da2bf2d6756184ef47990dce8afea" }, "require": { "backpack/backupmanager": "^2.0", @@ -1044,6 +1120,7 @@ "backpack/permissionmanager": "^5.0", "backpack/revise-operation": "^1.0", "barryvdh/laravel-debugbar": "^3.3", + "calebporzio/parental": "^0.10.0", "chrisjean/php-ico": "^1.0", "cubist/cms-front": "dev-master", "cubist/laravel-backpack-dropzone-field": "dev-master", @@ -1051,6 +1128,7 @@ "cubist/util": "dev-master", "cviebrock/eloquent-sluggable": "^7.0", "cviebrock/laravel-elasticsearch": "^4.2", + "digitallyhappy/toggle-field-for-backpack": "^2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1107,7 +1185,7 @@ } ], "description": "Cubist Backpack extension", - "time": "2020-06-12T10:01:55+00:00" + "time": "2020-06-15T13:30:20+00:00" }, { "name": "cubist/cms-front", @@ -1518,6 +1596,59 @@ ], "time": "2020-03-05T02:28:17+00:00" }, + { + "name": "digitallyhappy/toggle-field-for-backpack", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/DigitallyHappy/toggle-field-for-backpack.git", + "reference": "a8874d33f69f13d1aa937b75077f245599df1a2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DigitallyHappy/toggle-field-for-backpack/zipball/a8874d33f69f13d1aa937b75077f245599df1a2e", + "reference": "a8874d33f69f13d1aa937b75077f245599df1a2e", + "shasum": "" + }, + "require": { + "backpack/crud": "^4.1.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "DigitallyHappy\\ToggleFieldForBackpack\\AddonServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "DigitallyHappy\\ToggleFieldForBackpack\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Cristian Tabacitu", + "email": "hello@tabacitu.ro", + "homepage": "https://tabacitu.ro" + } + ], + "description": "Easily toggle boolean attributes with a new field type.", + "homepage": "https://github.com/digitallyhappy/toggle-field-for-backpack", + "keywords": [ + "Backpack for Laravel", + "addon", + "admin panel", + "backpack", + "laravel", + "toggle" + ], + "time": "2020-05-18T09:19:20+00:00" + }, { "name": "doctrine/cache", "version": "1.10.1", @@ -5197,16 +5328,16 @@ }, { "name": "symfony/console", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "00bed125812716d09b163f0727ef33bb49bf3448" + "reference": "0f0a271bc9b7d02a053d36fcdcb12662e2a8096e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/00bed125812716d09b163f0727ef33bb49bf3448", - "reference": "00bed125812716d09b163f0727ef33bb49bf3448", + "url": "https://api.github.com/repos/symfony/console/zipball/0f0a271bc9b7d02a053d36fcdcb12662e2a8096e", + "reference": "0f0a271bc9b7d02a053d36fcdcb12662e2a8096e", "shasum": "" }, "require": { @@ -5272,11 +5403,11 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-06-07T19:47:44+00:00" }, { "name": "symfony/css-selector", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -5329,7 +5460,7 @@ }, { "name": "symfony/debug", - "version": "v4.4.9", + "version": "v4.4.10", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -5432,7 +5563,7 @@ }, { "name": "symfony/error-handler", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", @@ -5489,7 +5620,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -5619,7 +5750,7 @@ }, { "name": "symfony/finder", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -5668,7 +5799,7 @@ }, { "name": "symfony/http-foundation", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", @@ -5729,16 +5860,16 @@ }, { "name": "symfony/http-kernel", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c" + "reference": "1151e5d51a680b22e758d05c6647dd9857503ec8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c", - "reference": "75ff5327a7d6ede3ccc2fac3ebca9ed776b3e85c", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1151e5d51a680b22e758d05c6647dd9857503ec8", + "reference": "1151e5d51a680b22e758d05c6647dd9857503ec8", "shasum": "" }, "require": { @@ -5824,20 +5955,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2020-05-31T06:14:18+00:00" + "time": "2020-06-12T11:25:56+00:00" }, { "name": "symfony/mime", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91" + "reference": "c0c418f05e727606e85b482a8591519c4712cf45" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/56261f89385f9d13cf843a5101ac72131190bc91", - "reference": "56261f89385f9d13cf843a5101ac72131190bc91", + "url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45", + "reference": "c0c418f05e727606e85b482a8591519c4712cf45", "shasum": "" }, "require": { @@ -5887,7 +6018,7 @@ "mime", "mime-type" ], - "time": "2020-05-25T12:33:44+00:00" + "time": "2020-06-09T15:07:35+00:00" }, { "name": "symfony/polyfill-ctype", @@ -6427,7 +6558,7 @@ }, { "name": "symfony/process", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -6477,16 +6608,16 @@ }, { "name": "symfony/routing", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "95cf30145b26c758d6d832aa2d0de3128978d556" + "reference": "bbd0ba121d623f66d165a55a108008968911f3eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/95cf30145b26c758d6d832aa2d0de3128978d556", - "reference": "95cf30145b26c758d6d832aa2d0de3128978d556", + "url": "https://api.github.com/repos/symfony/routing/zipball/bbd0ba121d623f66d165a55a108008968911f3eb", + "reference": "bbd0ba121d623f66d165a55a108008968911f3eb", "shasum": "" }, "require": { @@ -6551,7 +6682,7 @@ "uri", "url" ], - "time": "2020-05-30T20:35:19+00:00" + "time": "2020-06-10T11:49:58+00:00" }, { "name": "symfony/service-contracts", @@ -6613,16 +6744,16 @@ }, { "name": "symfony/string", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9" + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/90c2a5103f07feb19069379f3abdcdbacc7753a9", - "reference": "90c2a5103f07feb19069379f3abdcdbacc7753a9", + "url": "https://api.github.com/repos/symfony/string/zipball/ac70459db781108db7c6d8981dd31ce0e29e3298", + "reference": "ac70459db781108db7c6d8981dd31ce0e29e3298", "shasum": "" }, "require": { @@ -6680,11 +6811,11 @@ "utf-8", "utf8" ], - "time": "2020-05-20T17:43:50+00:00" + "time": "2020-06-11T12:16:36+00:00" }, { "name": "symfony/translation", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", @@ -6819,7 +6950,7 @@ }, { "name": "symfony/var-dumper", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -7875,16 +8006,16 @@ }, { "name": "filp/whoops", - "version": "2.7.2", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", - "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d", + "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d", "shasum": "" }, "require": { @@ -7932,7 +8063,7 @@ "throwable", "whoops" ], - "time": "2020-05-05T12:28:07+00:00" + "time": "2020-06-14T09:00:00+00:00" }, { "name": "fzaninotto/faker", @@ -8779,16 +8910,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4" + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", - "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", + "reference": "eba15e538f2bb3fe018b7bbb47d2fe32d404bfd2", "shasum": "" }, "require": { @@ -8825,20 +8956,20 @@ "filesystem", "iterator" ], - "time": "2020-04-18T05:02:12+00:00" + "time": "2020-06-15T12:54:35+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a" + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/7579d5a1ba7f3ac11c80004d205877911315ae7a", - "reference": "7579d5a1ba7f3ac11c80004d205877911315ae7a", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/62f696ad0d140e0e513e69eaafdebb674d622b4c", + "reference": "62f696ad0d140e0e513e69eaafdebb674d622b4c", "shasum": "" }, "require": { @@ -8878,25 +9009,28 @@ "keywords": [ "process" ], - "time": "2020-02-07T06:06:11+00:00" + "time": "2020-06-15T13:10:07+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346" + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/526dc996cc0ebdfa428cd2dfccd79b7b53fee346", - "reference": "526dc996cc0ebdfa428cd2dfccd79b7b53fee346", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c69cbf965d5317ba33f24a352539f354a25db09", + "reference": "0c69cbf965d5317ba33f24a352539f354a25db09", "shasum": "" }, "require": { "php": "^7.3" }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, "type": "library", "extra": { "branch-alias": { @@ -8924,7 +9058,7 @@ "keywords": [ "template" ], - "time": "2020-02-01T07:43:44+00:00" + "time": "2020-06-15T12:52:43+00:00" }, { "name": "phpunit/php-timer", @@ -9026,16 +9160,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.2.2", + "version": "9.2.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8fd0d8f80029682da89516a554f4d5f5a030345c" + "reference": "c1b1d62095ef78427f112a7a1c1502d4607e3c00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8fd0d8f80029682da89516a554f4d5f5a030345c", - "reference": "8fd0d8f80029682da89516a554f4d5f5a030345c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c1b1d62095ef78427f112a7a1c1502d4607e3c00", + "reference": "c1b1d62095ef78427f112a7a1c1502d4607e3c00", "shasum": "" }, "require": { @@ -9110,7 +9244,7 @@ "testing", "xunit" ], - "time": "2020-06-07T14:14:21+00:00" + "time": "2020-06-15T10:51:34+00:00" }, { "name": "psy/psysh", @@ -9255,16 +9389,16 @@ }, { "name": "sebastian/code-unit", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5" + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", - "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", + "reference": "d650ef9b1fece15ed4d6eaed6e6b469b7b81183a", "shasum": "" }, "require": { @@ -9297,20 +9431,20 @@ ], "description": "Collection of value objects that represent the PHP code units", "homepage": "https://github.com/sebastianbergmann/code-unit", - "time": "2020-04-30T05:58:10+00:00" + "time": "2020-06-15T13:11:26+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e" + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5b5dbe0044085ac41df47e79d34911a15b96d82e", - "reference": "5b5dbe0044085ac41df47e79d34911a15b96d82e", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c771130f0e8669104a4320b7101a81c2cc2963ef", + "reference": "c771130f0e8669104a4320b7101a81c2cc2963ef", "shasum": "" }, "require": { @@ -9342,20 +9476,20 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2020-02-07T06:20:13+00:00" + "time": "2020-06-15T12:56:39+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8" + "reference": "1de7b33e1d1fa4a58cb29b295c6e3349d73a6c4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/85b3435da967696ed618ff745f32be3ff4a2b8e8", - "reference": "85b3435da967696ed618ff745f32be3ff4a2b8e8", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1de7b33e1d1fa4a58cb29b295c6e3349d73a6c4e", + "reference": "1de7b33e1d1fa4a58cb29b295c6e3349d73a6c4e", "shasum": "" }, "require": { @@ -9406,7 +9540,7 @@ "compare", "equality" ], - "time": "2020-02-07T06:08:51+00:00" + "time": "2020-06-15T13:14:18+00:00" }, { "name": "sebastian/diff", @@ -9466,16 +9600,16 @@ }, { "name": "sebastian/environment", - "version": "5.1.0", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c" + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c", - "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", + "reference": "16eb0fa43e29c33d7f2117ed23072e26fc5ab34e", "shasum": "" }, "require": { @@ -9515,20 +9649,20 @@ "environment", "hhvm" ], - "time": "2020-04-14T13:36:52+00:00" + "time": "2020-06-15T13:00:01+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "80c26562e964016538f832f305b2286e1ec29566" + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/80c26562e964016538f832f305b2286e1ec29566", - "reference": "80c26562e964016538f832f305b2286e1ec29566", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d12fbca85da932d01d941b59e4b71a0d559db091", + "reference": "d12fbca85da932d01d941b59e4b71a0d559db091", "shasum": "" }, "require": { @@ -9582,7 +9716,7 @@ "export", "exporter" ], - "time": "2020-02-07T06:10:52+00:00" + "time": "2020-06-15T13:12:44+00:00" }, { "name": "sebastian/global-state", @@ -9640,16 +9774,16 @@ }, { "name": "sebastian/object-enumerator", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67516b175550abad905dc952f43285957ef4363" + "reference": "15f319d67c49fc55ebcdbffb3377433125588455" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67516b175550abad905dc952f43285957ef4363", - "reference": "e67516b175550abad905dc952f43285957ef4363", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/15f319d67c49fc55ebcdbffb3377433125588455", + "reference": "15f319d67c49fc55ebcdbffb3377433125588455", "shasum": "" }, "require": { @@ -9683,20 +9817,20 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2020-02-07T06:12:23+00:00" + "time": "2020-06-15T13:15:25+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7" + "reference": "14e04b3c25b821cc0702d4837803fe497680b062" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", - "reference": "f4fd0835cabb0d4a6546d9fe291e5740037aa1e7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/14e04b3c25b821cc0702d4837803fe497680b062", + "reference": "14e04b3c25b821cc0702d4837803fe497680b062", "shasum": "" }, "require": { @@ -9728,20 +9862,20 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2020-02-07T06:19:40+00:00" + "time": "2020-06-15T13:08:02+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cdd86616411fc3062368b720b0425de10bd3d579" + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cdd86616411fc3062368b720b0425de10bd3d579", - "reference": "cdd86616411fc3062368b720b0425de10bd3d579", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/a32789e5f0157c10cf216ce6c5136db12a12b847", + "reference": "a32789e5f0157c10cf216ce6c5136db12a12b847", "shasum": "" }, "require": { @@ -9781,20 +9915,20 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2020-02-07T06:18:20+00:00" + "time": "2020-06-15T13:06:44+00:00" }, { "name": "sebastian/resource-operations", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98" + "reference": "71421c1745788de4facae1b79af923650bd3ec15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", - "reference": "8c98bf0dfa1f9256d0468b9803a1e1df31b6fa98", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/71421c1745788de4facae1b79af923650bd3ec15", + "reference": "71421c1745788de4facae1b79af923650bd3ec15", "shasum": "" }, "require": { @@ -9826,7 +9960,7 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2020-02-07T06:13:02+00:00" + "time": "2020-06-15T13:17:14+00:00" }, { "name": "sebastian/type", @@ -10012,7 +10146,7 @@ }, { "name": "symfony/filesystem", - "version": "v5.1.0", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -10152,6 +10286,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { + "cubedesigners/userdatabase": 20, "cubist/cms-back": 20 }, "prefer-stable": true, diff --git a/config/app.php b/config/app.php index b169115..7f55dd4 100644 --- a/config/app.php +++ b/config/app.php @@ -218,11 +218,12 @@ return [ 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - + 'App' => Cubist\Backpack\app\Facades\App::class, + 'Arr' => Illuminate\Support\Arr::class, + 'Str' => Illuminate\Support\Str::class, ], ]; diff --git a/config/permission.php b/config/permission.php index c675dce..adee091 100644 --- a/config/permission.php +++ b/config/permission.php @@ -36,7 +36,7 @@ return [ * default value but you may easily change it to any table you like. */ - 'roles' => 'roles', + 'roles' => 'extranet_users.roles', /* * When using the "HasPermissions" trait from this package, we need to know which @@ -44,7 +44,7 @@ return [ * default value but you may easily change it to any table you like. */ - 'permissions' => 'permissions', + 'permissions' => 'extranet_users.permissions', /* * When using the "HasPermissions" trait from this package, we need to know which @@ -52,7 +52,7 @@ return [ * basic default value but you may easily change it to any table you like. */ - 'model_has_permissions' => 'model_has_permissions', + 'model_has_permissions' => 'extranet_users.model_has_permissions', /* * When using the "HasRoles" trait from this package, we need to know which @@ -60,7 +60,7 @@ return [ * basic default value but you may easily change it to any table you like. */ - 'model_has_roles' => 'model_has_roles', + 'model_has_roles' => 'extranet_users.model_has_roles', /* * When using the "HasRoles" trait from this package, we need to know which @@ -68,7 +68,7 @@ return [ * basic default value but you may easily change it to any table you like. */ - 'role_has_permissions' => 'role_has_permissions', + 'role_has_permissions' => 'extranet_users.role_has_permissions', ], 'column_names' => [