获取当前登录用户在当前程序中所有角色的名称:
var user = getWebUser();
var roles=user.getRoles();//获取用户
var currentApplicationid =getApplication();
var rtn="";
for(var it = roles.iterator();roles!=null && it.hasNext();){
var role = it.next();
if(currentApplicationid.equals(role.getApplicationid())){
rtn+=role.getName()+"|";
}
}
rtn;