Merge pull request #5611 from turbo124/v5-develop

Fixes for self updater
This commit is contained in:
David Bomba 2021-05-05 09:53:58 +10:00 committed by GitHub
commit 5189bdceb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 95 additions and 10 deletions

View File

@ -58,7 +58,7 @@ class SelfUpdateController extends BaseController
set_time_limit(0); set_time_limit(0);
define('STDIN', fopen('php://stdin', 'r')); define('STDIN', fopen('php://stdin', 'r'));
if (Ninja::isNinja()) { if (Ninja::isHosted()) {
return response()->json(['message' => ctrans('texts.self_update_not_available')], 403); return response()->json(['message' => ctrans('texts.self_update_not_available')], 403);
} }

View File

@ -47,7 +47,6 @@ class CompanyUser extends Pivot
'is_locked', 'is_locked',
'slack_webhook_url', 'slack_webhook_url',
'shop_restricted', 'shop_restricted',
'number_years_active',
]; ];
protected $touches = ['user']; protected $touches = ['user'];

View File

@ -157,6 +157,7 @@ class CompanyTransformer extends EntityTransformer
'oauth_password_required' => (bool)$company->oauth_password_required, 'oauth_password_required' => (bool)$company->oauth_password_required,
'session_timeout' => (int)$company->session_timeout, 'session_timeout' => (int)$company->session_timeout,
'default_password_timeout' => (int) $company->default_password_timeout, 'default_password_timeout' => (int) $company->default_password_timeout,
'invoice_task_datelog' => (bool) $company->invoice_task_datelog,
]; ];
} }

View File

@ -51,7 +51,7 @@ class CompanyUserTransformer extends EntityTransformer
'archived_at' => (int) $company_user->deleted_at, 'archived_at' => (int) $company_user->deleted_at,
'created_at' => (int) $company_user->created_at, 'created_at' => (int) $company_user->created_at,
'permissions_updated_at' => (int) $company_user->permissions_updated_at, 'permissions_updated_at' => (int) $company_user->permissions_updated_at,
'number_years_active' => (int) $company_user->number_years_active, //'number_years_active' => (int) $company_user->number_years_active,
]; ];
} }

View File

@ -30,6 +30,7 @@
"ext-dom": "*", "ext-dom": "*",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"asm/php-ansible": "dev-master",
"authorizenet/authorizenet": "^2.0", "authorizenet/authorizenet": "^2.0",
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",
"beganovich/snappdf": "^1.0", "beganovich/snappdf": "^1.0",

67
composer.lock generated
View File

@ -4,8 +4,60 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "f01381d3d00f0bd84acbda078ad1b99e", "content-hash": "38a79899673526624db4d62a76dd9a5e",
"packages": [ "packages": [
{
"name": "asm/php-ansible",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/maschmann/php-ansible.git",
"reference": "4f2145cad264fd9f800baf6d3a79dd43fd8009db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maschmann/php-ansible/zipball/4f2145cad264fd9f800baf6d3a79dd43fd8009db",
"reference": "4f2145cad264fd9f800baf6d3a79dd43fd8009db",
"shasum": ""
},
"require": {
"php": "^7.1.0|>8.0.0",
"psr/log": "^1.1",
"symfony/process": "^4.0|^5.0"
},
"require-dev": {
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^9.0"
},
"default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
"Asm\\": "Asm"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marc Aschmann",
"email": "maschmann@gmail.com"
}
],
"description": "A PHP wrapper for Ansible.",
"homepage": "https://github.com/maschmann/php-ansible",
"keywords": [
"ansible",
"php"
],
"support": {
"issues": "https://github.com/maschmann/php-ansible/issues",
"source": "https://github.com/maschmann/php-ansible/tree/master"
},
"time": "2021-03-02T18:27:29+00:00"
},
{ {
"name": "authorizenet/authorizenet", "name": "authorizenet/authorizenet",
"version": "2.0.2", "version": "2.0.2",
@ -51,16 +103,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.180.0", "version": "3.180.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "761d06d3d320bd1a0114f9d937eccd1613e1913b" "reference": "7801112fd8be227954a6ecfbfd85b01ee4a7cae4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/761d06d3d320bd1a0114f9d937eccd1613e1913b", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7801112fd8be227954a6ecfbfd85b01ee4a7cae4",
"reference": "761d06d3d320bd1a0114f9d937eccd1613e1913b", "reference": "7801112fd8be227954a6ecfbfd85b01ee4a7cae4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -135,9 +187,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.180.0" "source": "https://github.com/aws/aws-sdk-php/tree/3.180.1"
}, },
"time": "2021-05-03T20:41:22+00:00" "time": "2021-05-04T18:14:38+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -14247,6 +14299,7 @@
"aliases": [], "aliases": [],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": { "stability-flags": {
"asm/php-ansible": 20,
"webpatser/laravel-countries": 20 "webpatser/laravel-countries": 20
}, },
"prefer-stable": true, "prefer-stable": true,

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTaskPropertyToCompaniesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('company_user', function (Blueprint $table) {
$table->dropColumn('number_years_active');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}