admin 发表于 2019-2-8 13:37:58

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



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

#include <tc/LoggedInUser.hxx>

using namespace std;
using namespace Teamcenter::Core;

static logical isCurrentUserDba()
{
    LoggedInUser* loggedInUser = LoggedInUser::getInstance();

    logical isDba = loggedInUser->isUserSystemAdministrator();
    if(isDba == TRUE) cout << "    User is dba member "<< endl;
    if(isDba == FALSE) cout << "    User is not dba member "<< endl;
   
    return isDba;
}
页: [1]
查看完整版本: Teamcenter二次开发C++判断当前用户是否为dba账户