|
|
本帖最后由 bess 于 2012-12-31 15:15 编辑
获取当前登录用户在当前程序中所有角色的名称:
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;
摘自fys的分享,原帖子链接:http://www.teemlink.com/bbs/view ... ypeid%3D2#pid199654 |
|