天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2376|回复: 0

[Iscript] 获取当前登录用户在当前程序中所有角色的名称示例【获取用户所属所有角色名称】

[复制链接]
purple 发表于 2012-7-17 17:14:07 | 显示全部楼层 |阅读模式
本帖最后由 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

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 15:24

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表