mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-09-09 17:22:00 +08:00
fix(admin): 完善演示环境配置写入保护
同步系统设置、存储设置和调试模式的演示环境写入限制,保留正常读取及现有管理员权限校验。
This commit is contained in:
parent
9d064cc01f
commit
121e56252e
@ -90,6 +90,9 @@ class Config extends Controller
|
||||
$this->themes = static::themes;
|
||||
$this->fetch();
|
||||
} else {
|
||||
if (RuntimeService::check('demo')) {
|
||||
$this->error('演示环境禁止修改系统配置!');
|
||||
}
|
||||
$post = $this->request->post();
|
||||
// 修改网站后台入口路径
|
||||
if (!empty($post['xpath'])) {
|
||||
@ -127,6 +130,9 @@ class Config extends Controller
|
||||
*/
|
||||
public function storage()
|
||||
{
|
||||
if (!$this->request->isGet() && RuntimeService::check('demo')) {
|
||||
$this->error('演示环境禁止修改系统配置!');
|
||||
}
|
||||
$this->_applyFormToken();
|
||||
if ($this->request->isGet()) {
|
||||
$this->type = input('type', 'local');
|
||||
|
||||
@ -80,6 +80,9 @@ class System extends Controller
|
||||
*/
|
||||
public function debug()
|
||||
{
|
||||
if (RuntimeService::check('demo')) {
|
||||
$this->error('演示环境禁止修改系统配置!');
|
||||
}
|
||||
if (AdminService::isSuper()) {
|
||||
if (input('state')) {
|
||||
RuntimeService::set('product');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user