mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-30 04:17:55 +09:00
Fix module-check, Extend the permissions levels
This commit is contained in:
1 parent
3f606bffd8
commit
dc2f98e669
28 files changed
+3354
-2898
No files matched your search
+13
-13
@@ -1,24 +1,24 @@
|
||||
<?php
|
||||
use fruithost\Localization\I18N;
|
||||
use fruithost\Accounting\Auth;
|
||||
|
||||
if(isset($_POST['action'])) {
|
||||
|
||||
use fruithost\Accounting\Auth;
|
||||
use fruithost\Localization\I18N;
|
||||
|
||||
if(isset($_POST['action'])) {
|
||||
switch($_POST['action']) {
|
||||
case 'save':
|
||||
if(!Auth::hasPermission('SERVER::MANAGE')) {
|
||||
if(!Auth::hasPermission('SERVER::SETTINGS')) {
|
||||
$this->assign('error', I18N::get('You have no permissions for this action!'));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$template->getCore()->setSettings('PROJECT_NAME', $_POST['project_name']);
|
||||
$template->getCore()->setSettings('PROJECT_COPYRIGHT', isset($_POST['project_copyright']) && $_POST['project_copyright'] == 'true');
|
||||
$template->getCore()->setSettings('LANGUAGE', $_POST['language']);
|
||||
$template->getCore()->setSettings('TIME_FORMAT', $_POST['time_format']);
|
||||
$template->getCore()->setSettings('TIME_ZONE', $_POST['time_zone']);
|
||||
|
||||
$template->getCore()->setSettings('PROJECT_NAME', $_POST['project_name']);
|
||||
$template->getCore()->setSettings('PROJECT_COPYRIGHT', isset($_POST['project_copyright']) && $_POST['project_copyright'] == 'true');
|
||||
$template->getCore()->setSettings('LANGUAGE', $_POST['language']);
|
||||
$template->getCore()->setSettings('TIME_FORMAT', $_POST['time_format']);
|
||||
$template->getCore()->setSettings('TIME_ZONE', $_POST['time_zone']);
|
||||
$template->getCore()->getHooks()->runAction('SAVE_SERVER_SETTINGS', $_POST);
|
||||
$this->assign('success', I18N::get('The system settings has been saved.'));
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user