mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-13 08:45:01 +00:00
check write permission added into setup wizard and server status
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
"/chunks/request.js": "/chunks/request.js?id=eb7839bf98d51a89",
|
||||
"/chunks/request-upload.js": "/chunks/request-upload.js?id=276f65cd6b5ea820",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=3c2fc454c3fce8d2",
|
||||
"/chunks/status-check.js": "/chunks/status-check.js?id=63d576ce787c1ced",
|
||||
"/chunks/status-check.js": "/chunks/status-check.js?id=883a6d827b3a33ab",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=d9811e4a45a873e7",
|
||||
"/chunks/database.js": "/chunks/database.js?id=91cbfea9fce46de8",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=4355a418b292c1c7",
|
||||
@@ -46,7 +46,7 @@
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=2d437d95f3823ded",
|
||||
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=8b0999957ba0a5fc",
|
||||
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=30a7d6424225bcd0",
|
||||
"/chunks/app-server.js": "/chunks/app-server.js?id=212f36990ede9cb9",
|
||||
"/chunks/app-server.js": "/chunks/app-server.js?id=442ad4f53cfa9acf",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=b2db52bfd512e402",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=3babb68ac329a2e4",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=a20e623585f77df6",
|
||||
|
||||
@@ -82,6 +82,29 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Writable directories-->
|
||||
<div class="card shadow-card">
|
||||
<FormLabel icon="database">Writable Permission</FormLabel>
|
||||
|
||||
<div
|
||||
v-for="(isWritable, file, i) in writable"
|
||||
:key="i"
|
||||
class="md:flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
>
|
||||
<div class="text-left">
|
||||
<b class="block text-sm font-bold">/{{ file }}</b>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<check-icon v-if="isWritable" size="16" class="vue-feather text-green-600 dark:text-green-600" />
|
||||
<x-icon v-if="!isWritable" size="16" class="vue-feather text-red-600 dark:text-red-600" />
|
||||
|
||||
<span :class="{'text-green-600 dark:text-green-600': isWritable, 'text-red-600 dark:text-red-600': !isWritable}" class="ml-3 text-sm font-bold ">
|
||||
{{ isWritable ? 'Writable' : 'Unwritable'}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--PHP version and ini check-->
|
||||
<div class="card shadow-card">
|
||||
<FormLabel icon="info"> PHP Settings </FormLabel>
|
||||
@@ -208,6 +231,7 @@ export default {
|
||||
apiRunning: undefined,
|
||||
backups: undefined,
|
||||
logs: undefined,
|
||||
writable: undefined,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -233,6 +257,7 @@ export default {
|
||||
this.phpVersion = response.data.php_version
|
||||
this.backups = response.data.backups
|
||||
this.logs = response.data.logs
|
||||
this.writable = response.data.writable
|
||||
})
|
||||
|
||||
// Ping API
|
||||
|
||||
@@ -99,6 +99,29 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Writable directories-->
|
||||
<div class="card shadow-card">
|
||||
<FormLabel icon="database">Writable Permission</FormLabel>
|
||||
|
||||
<div
|
||||
v-for="(isWritable, file, i) in writable"
|
||||
:key="i"
|
||||
class="md:flex md:space-y-0 space-y-3 items-center justify-between border-b border-dashed border-light py-3 dark:border-opacity-5"
|
||||
>
|
||||
<div class="text-left">
|
||||
<b class="block text-sm font-bold">/{{ file }}</b>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<check-icon v-if="isWritable" size="16" class="vue-feather text-green-600 dark:text-green-600" />
|
||||
<x-icon v-if="!isWritable" size="16" class="vue-feather text-red-600 dark:text-red-600" />
|
||||
|
||||
<span :class="{'text-green-600 dark:text-green-600': isWritable, 'text-red-600 dark:text-red-600': !isWritable}" class="ml-3 text-sm font-bold ">
|
||||
{{ isWritable ? 'Writable' : 'Unwritable'}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--API check-->
|
||||
<div class="card shadow-card">
|
||||
<FormLabel> API </FormLabel>
|
||||
@@ -187,6 +210,9 @@ export default {
|
||||
phpVersion() {
|
||||
return this.$root.$data.config.statusCheck.php_version
|
||||
},
|
||||
writable() {
|
||||
return this.$root.$data.config.statusCheck.writable
|
||||
},
|
||||
isCheckedAPI() {
|
||||
return typeof this.apiRunning !== 'undefined'
|
||||
},
|
||||
@@ -208,7 +234,11 @@ export default {
|
||||
(setting) => setting.status === true
|
||||
)
|
||||
|
||||
if (modulesCheck && iniCheck && this.apiRunning && this.phpVersion.acceptable) {
|
||||
let writeCheck = Object.values(this.$root.$data.config.statusCheck.writable).every(
|
||||
(directory) => directory === true
|
||||
)
|
||||
|
||||
if (writeCheck && modulesCheck && iniCheck && this.apiRunning && this.phpVersion.acceptable) {
|
||||
this.$router.push({ name: 'PurchaseCode' })
|
||||
} else {
|
||||
this.isError = true
|
||||
|
||||
@@ -12,7 +12,17 @@ class GetServerSetupStatusAction
|
||||
$max_execution_time = 600;
|
||||
$php_version = '8.0';
|
||||
|
||||
// Writable
|
||||
$storageDirectory = dirname(storage_path('/storage'));
|
||||
$bootstrapDirectory = dirname(storage_path('/bootstrap'));
|
||||
$envFile = dirname(storage_path('/.env'));
|
||||
|
||||
return [
|
||||
'writable' => [
|
||||
'bootstrap' => is_writable($bootstrapDirectory),
|
||||
'storage' => is_writable($storageDirectory),
|
||||
'env' => is_writable($envFile),
|
||||
],
|
||||
'modules' => [
|
||||
'tokenizer' => extension_loaded('tokenizer'),
|
||||
'fileinfo' => extension_loaded('fileinfo'),
|
||||
|
||||
Reference in New Issue
Block a user