PLM之家PLMHome-工业软件践行者

Teamcenter二次开发C++判断当前用户是否为dba账户

[复制链接]

2019-2-8 13:37:58 2046 0

admin 发表于 2019-2-8 13:37:58 |阅读模式

admin 楼主

2019-2-8 13:37:58

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
% ~% d/ k9 a( ^( p
% @& s8 S' \. ]) g; A
Teamcenter二次开发C++判断当前用户是否为dba账户
1 P6 ?$ v% ~! V. ]+ j# W8 {1 X: n8 A
[mw_shl_code=cpp,true]#include <TC/LoggedInUser.hxx>, M  y# U- K; j) c4 p" F
. A3 \9 f4 V$ D- o; w
using namespace std;
" _! G$ O1 m3 j# L& `, _using namespace Teamcenter::Core;
  K8 [1 I* b; d: ^4 R" D. v  I5 Q7 ?2 b
static logical isCurrentUserDba()! i& W! L0 n; g7 W2 Q
{8 j5 H& Z, l! Z5 G
    LoggedInUser* loggedInUser = LoggedInUser::getInstance();
- W9 [4 R4 ?5 @& U2 x5 k8 D3 A" ]3 m' V1 Q5 ?% y. E3 u
    logical isDba = loggedInUser->isUserSystemAdministrator();) E4 V* i1 k7 u1 b5 d% X9 z: D
    if(isDba == TRUE) cout << "    User is dba member "<< endl;$ l  B( q: \* n6 Z4 A# a
    if(isDba == FALSE) cout << "    User is not dba member "<< endl;/ g9 `" s' s/ m
      W  m' s" j: t' @' P
    return isDba;8 Q7 S% @0 }3 i" ~
}[/mw_shl_code]
5 ]& P/ u, q9 B- v" d
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了