Problem: Billing is always on
Solution: Make billing configurable through LIBRETIME_ENABLE_BILLING and deactivate it This should catch all the changes needed to deactive billing in LibreTime. * [x] only call billing when it is enabled * [x] let super admins edit their info * [x] dont link to billing if it is disabled
This commit is contained in:
parent
4557395a86
commit
6e03863fa1
11 changed files with 176 additions and 164 deletions
|
@ -118,8 +118,14 @@ class Amazon_S3StorageBackend extends StorageBackend
|
|||
|
||||
public function getFilePrefix()
|
||||
{
|
||||
$hostingId = Billing::getClientInstanceId();
|
||||
$filePrefix = substr($hostingId, -2)."/".$hostingId;
|
||||
$filePrefix = '';
|
||||
// only prefix files on S3 when billing is active since saas customers share a s3 bucket
|
||||
// I'm not sure why the choice was made to put everything into one bucket
|
||||
// We might refactor this to use a bucket per customer if we revisit S3
|
||||
if (LIBRETIME_ENABLE_BILLING === true) {
|
||||
$hostingId = Billing::getClientInstanceId();
|
||||
$filePrefix = substr($hostingId, -2)."/".$hostingId;
|
||||
}
|
||||
return $filePrefix;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue