mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Document permissions
This commit is contained in:
parent
de24d00315
commit
e347c5ad51
@ -49,7 +49,7 @@ class DocumentController extends Controller
|
||||
{
|
||||
$contact = auth()->user();
|
||||
|
||||
Storage::makeDirectory('public/' . $contact->client->client_hash, 0755);
|
||||
Storage::makeDirectory('public/' . $contact->client->client_hash, 0775);
|
||||
|
||||
$path = Storage::putFile('public/' . $contact->client->client_hash, $request->file('file'));
|
||||
|
||||
|
@ -87,7 +87,7 @@ class CreateCreditPdf implements ShouldQueue
|
||||
|
||||
$html = (new HtmlEngine($designer, $this->invitation, 'credit'))->build();
|
||||
|
||||
Storage::makeDirectory($path, 0755);
|
||||
Storage::makeDirectory($path, 0775);
|
||||
|
||||
$pdf = $this->makePdf(null, null, $html);
|
||||
|
||||
|
@ -86,7 +86,7 @@ class CreateInvoicePdf implements ShouldQueue
|
||||
$html = (new HtmlEngine($designer, $this->invitation, 'invoice'))->build();
|
||||
|
||||
//todo - move this to the client creation stage so we don't keep hitting this unnecessarily
|
||||
Storage::makeDirectory($path, 0755);
|
||||
Storage::makeDirectory($path, 0775);
|
||||
|
||||
$pdf = $this->makePdf(null, null, $html);
|
||||
|
||||
|
@ -84,7 +84,7 @@ class CreateQuotePdf implements ShouldQueue
|
||||
$designer = new Designer($this->quote, $design, $this->quote->client->getSetting('pdf_variables'), 'quote');
|
||||
|
||||
//todo - move this to the client creation stage so we don't keep hitting this unnecessarily
|
||||
Storage::makeDirectory($path, 0755);
|
||||
Storage::makeDirectory($path, 0775);
|
||||
|
||||
$html = (new HtmlEngine($designer, $this->invitation, 'quote'))->build();
|
||||
|
||||
|
@ -39,7 +39,7 @@ class UploadAvatar implements ShouldQueue
|
||||
{
|
||||
|
||||
//make dir
|
||||
Storage::makeDirectory('public/' . $this->directory, 0755);
|
||||
Storage::makeDirectory('public/' . $this->directory, 0775);
|
||||
|
||||
$tmp_file = sha1(time()).".png";
|
||||
|
||||
|
@ -76,7 +76,7 @@ class Activity extends StaticModel
|
||||
const PAID_INVOICE=54; //
|
||||
const EMAIL_INVOICE_FAILED=57;
|
||||
const REVERSED_INVOICE=58; //
|
||||
const CANCELLED_INVOICE=59;
|
||||
const CANCELLED_INVOICE=59; //
|
||||
const VIEW_CREDIT=60; //
|
||||
|
||||
protected $casts = [
|
||||
|
@ -63,7 +63,7 @@ class Phantom
|
||||
$phantom_url = "https://phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$url}%22,renderType:%22pdf%22%7D";
|
||||
$pdf = \App\Utils\CurlUtils::get($phantom_url);
|
||||
|
||||
Storage::makeDirectory($path, 0755);
|
||||
Storage::makeDirectory($path, 0775);
|
||||
|
||||
$instance = Storage::disk(config('filesystems.default'))->put($file_path, $pdf);
|
||||
|
||||
|
@ -46,6 +46,16 @@ return [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
'permissions' => [
|
||||
'file' => [
|
||||
'public' => 0664,
|
||||
'private' => 0600,
|
||||
],
|
||||
'dir' => [
|
||||
'public' => 0777,
|
||||
'private' => 0700,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'public' => [
|
||||
@ -53,6 +63,16 @@ return [
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
'permissions' => [
|
||||
'file' => [
|
||||
'public' => 0664,
|
||||
'private' => 0600,
|
||||
],
|
||||
'dir' => [
|
||||
'public' => 0777,
|
||||
'private' => 0700,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
's3' => [
|
||||
|
@ -65,7 +65,8 @@ class DesignTest extends TestCase
|
||||
|
||||
$this->invoice->uses_inclusive_taxes = false;
|
||||
|
||||
$this->invoice->service()->createInvitations()->markSent()->save();
|
||||
$this->invoice->service()->createInvitations()->markSent()->applyNumber()->save();
|
||||
|
||||
$this->invoice->fresh();
|
||||
$this->invoice->load('invitations');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user