mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
40 lines
832 B
PHP
40 lines
832 B
PHP
<?php
|
|
|
|
namespace InvoiceShelf\Http\Controllers\V1\Installation;
|
|
|
|
use InvoiceShelf\Http\Controllers\Controller;
|
|
use InvoiceShelf\Space\FilePermissionChecker;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class FilePermissionsController extends Controller
|
|
{
|
|
/**
|
|
* @var PermissionsChecker
|
|
*/
|
|
protected $permissions;
|
|
|
|
/**
|
|
* @param PermissionsChecker $checker
|
|
*/
|
|
public function __construct(FilePermissionChecker $checker)
|
|
{
|
|
$this->permissions = $checker;
|
|
}
|
|
|
|
/**
|
|
* Display the permissions check page.
|
|
*
|
|
* @return JsonResponse
|
|
*/
|
|
public function permissions()
|
|
{
|
|
$permissions = $this->permissions->check(
|
|
config('installer.permissions')
|
|
);
|
|
|
|
return response()->json([
|
|
'permissions' => $permissions,
|
|
]);
|
|
}
|
|
}
|