diff --git a/app/User.php b/app/User.php index 38edc3e9..a3fb76fb 100644 --- a/app/User.php +++ b/app/User.php @@ -15,7 +15,7 @@ class User extends Authenticatable * * @var array */ - protected $dates = ['deleted_at']; + protected $dates = ['deleted_at', 'email_verified_at']; /** * The attributes that are mass assignable. @@ -44,4 +44,9 @@ class User extends Authenticatable { return url(config('app.url') . '/' . $this->username); } + + public function settings() + { + return $this->hasOne(UserSetting::class); + } } diff --git a/composer.json b/composer.json index 296a8d58..5f4163fe 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,6 @@ "type": "project", "require": { "php": "^7.1.3", - "99designs/http-signatures-guzzlehttp": "^2.0", "beyondcode/laravel-self-diagnosis": "^0.4.0", "bitverse/identicon": "^1.1", "doctrine/dbal": "^2.7", @@ -23,6 +22,7 @@ "pixelfed/dotenv-editor": "^2.0", "pixelfed/fractal": "^0.18.0", "pixelfed/google2fa-laravel": "^2.0", + "pixelfed/http-signatures-guzzlehttp": "^4.0", "predis/predis": "^1.1", "spatie/laravel-backup": "^5.0.0", "spatie/laravel-image-optimizer": "^1.1", diff --git a/composer.lock b/composer.lock index 7d276d47..3ce1314f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,117 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "00d8fe04c29dc3eb62ed466b4ef241da", + "content-hash": "69060b27fb92fe5440aae30a3e4928ac", "packages": [ - { - "name": "99designs/http-signatures", - "version": "4.0.0", - "source": { - "type": "git", - "url": "https://github.com/99designs/http-signatures-php.git", - "reference": "acb9d2e4f4661de9445fa5930b49a259bfd6175b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/99designs/http-signatures-php/zipball/acb9d2e4f4661de9445fa5930b49a259bfd6175b", - "reference": "acb9d2e4f4661de9445fa5930b49a259bfd6175b", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": ">=5.5", - "psr/http-message": "^1.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", - "guzzlehttp/psr7": "^1.2", - "phpunit/phpunit": "~4.8", - "symfony/http-foundation": "~2.8|~3.0", - "symfony/psr-http-message-bridge": "^1.0", - "zendframework/zend-diactoros": "^1.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "HttpSignatures\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paul Annesley", - "email": "paul@99designs.com" - } - ], - "description": "Sign and verify HTTP messages", - "keywords": [ - "hmac", - "http", - "https", - "signature", - "signed", - "signing" - ], - "time": "2017-05-04T01:36:17+00:00" - }, - { - "name": "99designs/http-signatures-guzzlehttp", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/99designs/http-signatures-guzzlehttp.git", - "reference": "920ddd3cfbfae4c11a0f7c3b44699c01ae8cb203" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/99designs/http-signatures-guzzlehttp/zipball/920ddd3cfbfae4c11a0f7c3b44699c01ae8cb203", - "reference": "920ddd3cfbfae4c11a0f7c3b44699c01ae8cb203", - "shasum": "" - }, - "require": { - "99designs/http-signatures": ">=3.0.0 <5.0.0", - "guzzlehttp/guzzle": ">=6.0 <7.0.0", - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adrian Palmer", - "email": "adrian.palmer@99designs.com" - }, - { - "name": "Ruben de Vries", - "email": "ruben@rubensayshi.com" - } - ], - "description": "Sign and verify HTTP messages with Guzzle 6", - "homepage": "https://github.com/99designs/http-signatures-guzzlehttp", - "keywords": [ - "guzzle 6", - "hmac", - "http", - "https", - "signature", - "signed", - "signing" - ], - "time": "2017-05-04T02:00:20+00:00" - }, { "name": "beyondcode/laravel-self-diagnosis", "version": "0.4.0", @@ -2811,6 +2702,115 @@ ], "time": "2018-07-05T03:42:05+00:00" }, + { + "name": "pixelfed/http-signatures", + "version": "v5.0.0", + "source": { + "type": "git", + "url": "https://github.com/pixelfed/http-signatures-php.git", + "reference": "a3b6985c632b7add360a24a507eae4187f2b51a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pixelfed/http-signatures-php/zipball/a3b6985c632b7add360a24a507eae4187f2b51a4", + "reference": "a3b6985c632b7add360a24a507eae4187f2b51a4", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0", + "php": ">=5.5", + "psr/http-message": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.11", + "guzzlehttp/psr7": "^1.2", + "phpunit/phpunit": "~4.8", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/psr-http-message-bridge": "^1.0", + "zendframework/zend-diactoros": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "HttpSignatures\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Annesley", + "email": "paul@99designs.com" + } + ], + "description": "Sign and verify HTTP messages", + "keywords": [ + "hmac", + "http", + "https", + "signature", + "signed", + "signing" + ], + "time": "2018-07-18T02:16:30+00:00" + }, + { + "name": "pixelfed/http-signatures-guzzlehttp", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/pixelfed/http-signatures-guzzlehttp.git", + "reference": "19f74eb85d7d13b7e71d6c7983a227c06342c8a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pixelfed/http-signatures-guzzlehttp/zipball/19f74eb85d7d13b7e71d6c7983a227c06342c8a4", + "reference": "19f74eb85d7d13b7e71d6c7983a227c06342c8a4", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": ">=6.0 <7.0.0", + "php": ">=5.5.0", + "pixelfed/http-signatures": "5.x" + }, + "require-dev": { + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Palmer", + "email": "adrian.palmer@99designs.com" + }, + { + "name": "Ruben de Vries", + "email": "ruben@rubensayshi.com" + } + ], + "description": "Sign and verify HTTP messages with Guzzle 6", + "homepage": "https://github.com/99designs/http-signatures-guzzlehttp", + "keywords": [ + "guzzle 6", + "hmac", + "http", + "https", + "signature", + "signed", + "signing" + ], + "time": "2018-07-18T02:23:35+00:00" + }, { "name": "predis/predis", "version": "v1.1.1", diff --git a/config/app.php b/config/app.php index a281d980..b426fa53 100644 --- a/config/app.php +++ b/config/app.php @@ -151,6 +151,7 @@ return [ * Package Service Providers... */ Greggilbert\Recaptcha\RecaptchaServiceProvider::class, + Jackiedo\DotenvEditor\DotenvEditorServiceProvider::class, /* * Application Service Providers... @@ -211,6 +212,7 @@ return [ 'View' => Illuminate\Support\Facades\View::class, 'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class, + 'DotenvEditor' => Jackiedo\DotenvEditor\Facades\DotenvEditor::class, ], ]; diff --git a/config/dotenv-editor.php b/config/dotenv-editor.php new file mode 100644 index 00000000..583039c6 --- /dev/null +++ b/config/dotenv-editor.php @@ -0,0 +1,27 @@ + true, + + /* + |---------------------------------------------------------------------- + | Backup location + |---------------------------------------------------------------------- + | + | This value is used when you backup your file. This value is the sub + | path from root folder of project application. + */ + + 'backupPath' => base_path('storage/dotenv-editor/backups/') + +); diff --git a/config/pixelfed.php b/config/pixelfed.php index 66bfd8a2..43d60717 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -23,7 +23,7 @@ return [ | This value is the version of your PixelFed instance. | */ - 'version' => '0.1.0', + 'version' => '0.1.1', /* |-------------------------------------------------------------------------- @@ -82,8 +82,8 @@ return [ | Account file size limit |-------------------------------------------------------------------------- | - | Update the max account size, the per user limit of files in kb. - | This applies to local and remote users. Old remote posts may be GC. + | Update the max account size, the per user limit of files in KB. + | | */ 'max_account_size' => env('MAX_ACCOUNT_SIZE', 100000),