feat(plugin): 实体级 data_scope + scope_role + data_scope_levels 声明
- PluginEntity 新增 data_scope: Option<bool> 字段,控制是否启用行级数据权限 - PluginField 新增 scope_role: Option<String> 字段,标记数据权限的"所有者"字段 - PluginPermission 新增 data_scope_levels: Option<Vec<String>> 字段,声明支持的数据范围等级 - 更新 default_for_field() 测试辅助和 dynamic_table.rs 中的 PluginEntity 构造 - 新增 parse_entity_with_data_scope 和 parse_permission_with_data_scope_levels 测试
This commit is contained in:
@@ -1019,6 +1019,7 @@ mod tests {
|
||||
],
|
||||
indexes: vec![],
|
||||
relations: vec![],
|
||||
data_scope: None,
|
||||
};
|
||||
|
||||
let sql = DynamicTableManager::build_create_table_sql("erp_crm", &entity);
|
||||
@@ -1060,6 +1061,7 @@ mod tests {
|
||||
}],
|
||||
indexes: vec![],
|
||||
relations: vec![],
|
||||
data_scope: None,
|
||||
};
|
||||
|
||||
let sql = DynamicTableManager::build_create_table_sql("erp_crm", &entity);
|
||||
|
||||
Reference in New Issue
Block a user