提交 e61ba025 编写于 作者: sq3536's avatar sq3536

权限调整

上级 1b43da9e
......@@ -324,22 +324,25 @@ public class ApiMethodModel extends BaseModel {
else if("FETCH".equalsIgnoreCase(getPSDEServiceAPIMethod().getMethodType()))
{
permission.put("cond","hasAnyAuthority('ROLE_SUPERADMIN','"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName().replace("Fetch","search")+"-all','"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-Get-all')"+
" and hasPermission(#"+this.getInParamName()+",'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-Get')");
" or hasPermission(#"+this.getInParamName()+",'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-Get')");
}
else if(this.getName().equalsIgnoreCase("Get"))
{
permission.put("ano", "PostAuthorize");
permission.put("cond","hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getDefaultDto().getCodeName())+"Mapping.toDomain(returnObject.body),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
permission.put("cond","hasAnyAuthority('ROLE_SUPERADMIN','"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"-all')" +
" or hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getDefaultDto().getCodeName())+"Mapping.toDomain(returnObject.body),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
}
else if(this.getName().equalsIgnoreCase("Update")||this.getName().equalsIgnoreCase("Remove")||ObjectUtils.isEmpty(this.getInParam()))
{
permission.put("cond","hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getEntity().getCodeName())+"Service.get(#"+StringAdvUtils.camelcase(apiEntity.getEntity().getKeyField().getCodeName())+"),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
permission.put("cond","hasAnyAuthority('ROLE_SUPERADMIN','"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"-all')" +
" or hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getEntity().getCodeName())+"Service.get(#"+StringAdvUtils.camelcase(apiEntity.getEntity().getKeyField().getCodeName())+"),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
}
else if(this.getName().equalsIgnoreCase("Create")||this.getName().equalsIgnoreCase("Save")||this.isNeedDto2Domain())
{
permission.put("cond","hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getDefaultDto().getCodeName())+"Mapping.toDomain(#"+this.getInParamName()+"),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
permission.put("cond","hasAnyAuthority('ROLE_SUPERADMIN','"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"-all')" +
" or hasPermission(this."+StringAdvUtils.camelcase(this.getApiEntity().getDefaultDto().getCodeName())+"Mapping.toDomain(#"+this.getInParamName()+"),'"+this.getApiEntity().getEntity().getSystem().getDeploySysId()+"-"+this.getApiEntity().getEntity().getCodeName()+"-"+this.getName()+"')");
}
return permission;
}
......
......@@ -214,34 +214,4 @@ public class AppModel extends BaseModel{
}
public Map<String,String> getExModel()
{
Map<String,String> map=new LinkedHashMap<>();
map.put("TySlKg","控告类信访");
map.put("TySlXsss","刑事申诉类信访");
map.put("TySlSfjz","国家司法救助类信访");
map.put("TySlGjpc","国家赔偿类信访");
map.put("TySlMsss","民事申诉类信访");
map.put("TySlXzss","行政申诉类信访");
map.put("TySlQt","其他类信访");
map.put("TyHfdf","回复答复");
map.put("TyCff","重复访");
map.put("TyQtXfr","其他信访人");
map.put("TyQtBXfr","其他被信访人");
map.put("TyLscydl","律师参与代理");
map.put("TyYcspyy","远程视频预约");
map.put("TyZdxf","重大信访");
map.put("TyFxpg","风险评估");
map.put("TyMydpj","满意度评价");
map.put("TyFqtb","访情通报");
map.put("TyGyss","公益诉讼");
map.put("TyWcnrbh","未成年人保护");
map.put("TyGktz","公开听证");
map.put("TyZyhy","重要会议");
map.put("TyTzgg","通知公告");
map.put("TyGfxwj","规范性文件");
map.put("TyJypx","教育培训");
map.put("TyJyfx","经验分享");
return map;
}
}
{{#eq apps "link"}}
{{#eq apps "link1"}}
package {{packageName}}.api.{{apps}}.rest;
import cn.ibizlab.edge.api.link.annotation.G1;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册