admin 发表于 2020-2-8 09:35:45

Teamcenter二次开发源码分享;判断当前用户是否为DBA



Teamcenter二次开发源码分享;判断当前用户是否为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二次开发源码分享;判断当前用户是否为DBA