Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117661581
D3173.1774871550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D3173.1774871550.diff
View Options
diff --git a/src/app/Tenant.php b/src/app/Tenant.php
--- a/src/app/Tenant.php
+++ b/src/app/Tenant.php
@@ -20,7 +20,6 @@
'title',
];
- protected $keyType = 'bigint';
/**
* Utility method to get tenant-specific system setting.
diff --git a/src/app/Traits/UuidIntKeyTrait.php b/src/app/Traits/UuidIntKeyTrait.php
--- a/src/app/Traits/UuidIntKeyTrait.php
+++ b/src/app/Traits/UuidIntKeyTrait.php
@@ -38,14 +38,4 @@
{
return false;
}
-
- /**
- * Get the key type.
- *
- * @return string
- */
- public function getKeyType()
- {
- return 'bigint';
- }
}
diff --git a/src/resources/js/locale.js b/src/resources/js/locale.js
--- a/src/resources/js/locale.js
+++ b/src/resources/js/locale.js
@@ -30,7 +30,7 @@
// Save the selected language in a cookie, so it can be used server-side
// after page reload. Make the cookie valid for 10 years
const age = 10 * 60 * 60 * 24 * 365
- document.cookie = 'language=' + lang + '; max-age=' + age
+ document.cookie = 'language=' + lang + '; max-age=' + age + '; path=/; secure'
return lang
}
diff --git a/src/tests/Feature/Console/Wallet/ChargeTest.php b/src/tests/Feature/Console/Wallet/ChargeTest.php
--- a/src/tests/Feature/Console/Wallet/ChargeTest.php
+++ b/src/tests/Feature/Console/Wallet/ChargeTest.php
@@ -69,7 +69,7 @@
Queue::fake();
// The wallet has entitlements to charge, and negative balance
- $sku = \App\Sku::where('title', 'mailbox')->first();
+ $sku = \App\Sku::withObjectTenantContext($user)->where('title', 'mailbox')->first();
$entitlement = \App\Entitlement::create([
'wallet_id' => $wallet->id,
'sku_id' => $sku->id,
@@ -78,12 +78,12 @@
'entitleable_type' => \App\User::class,
]);
\App\Entitlement::where('id', $entitlement->id)->update([
- 'created_at' => \Carbon\Carbon::now()->subMonths(1),
- 'updated_at' => \Carbon\Carbon::now()->subMonths(1),
+ 'created_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
+ 'updated_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
]);
\App\User::where('id', $user->id)->update([
- 'created_at' => \Carbon\Carbon::now()->subMonths(1),
- 'updated_at' => \Carbon\Carbon::now()->subMonths(1),
+ 'created_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
+ 'updated_at' => \Carbon\Carbon::now()->subMonthsNoOverflow(1),
]);
$this->assertSame(100, $wallet->fresh()->chargeEntitlements(false));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 11:52 AM (2 d, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18806790
Default Alt Text
D3173.1774871550.diff (2 KB)
Attached To
Mode
D3173: Get rid of keyType=bigint, and make the language cookie "secure"
Attached
Detach File
Event Timeline