mirror of https://gitee.com/karson/fastadmin.git
将用户相关表加入到受保护列表中。
parent
f05e5ae722
commit
e5235a4991
|
|
@ -23,11 +23,12 @@ class Crud extends Command
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 受保护的系统表,crud不会生效
|
* 受保护的系统表, crud不会生效
|
||||||
*/
|
*/
|
||||||
protected $systemTable = [
|
protected $systemTables = [
|
||||||
'admin','admin_log','auth_group','auth_group_access','auth_rule',
|
'admin', 'admin_log', 'auth_group', 'auth_group_access', 'auth_rule',
|
||||||
'attachment', 'config','category'
|
'attachment', 'config', 'category', 'ems', 'sms',
|
||||||
|
'user', 'user_group', 'user_rule', 'user_score_log', 'user_token',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -311,8 +312,8 @@ class Crud extends Command
|
||||||
$prefix = Config::get($db . '.prefix');
|
$prefix = Config::get($db . '.prefix');
|
||||||
|
|
||||||
//系统表无法生成,防止后台错乱
|
//系统表无法生成,防止后台错乱
|
||||||
if(in_array(str_replace($prefix,"",$table),$this->systemTable)){
|
if(in_array(str_replace($prefix,"",$table),$this->systemTables)){
|
||||||
throw new Exception('system table name can\'t crud');
|
throw new Exception('system table can\'t be crud');
|
||||||
}
|
}
|
||||||
|
|
||||||
//模块
|
//模块
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue