- (function(){
- var user = getWebUser();
- var roles=user.getRoles();
- var ApplicationId =getApplication();
- var val=true;
- for(var it = roles.iterator();roles!=null && it.hasNext();){
- var role = it.next();
- if(ApplicationId.equals(role.getApplicationid())){
- var rtn=role.getName();
- println("rtn------------>"+rtn);
- if(rtn.equals("管理员"||"培训专员"||"财务"||"项目经理")){
- val=false;
- }
- }
- }
- println("val------------>"+val);
- return val;
- })();
复制代码 |