Teamcenter C++ API Reference  2312
LoggedInUser.hxx
Go to the documentation of this file.
1 // ==================================================
2 // Copyright 2022 Siemens Digital Industries Software
3 // ==================================================
4 // Copyright 2013.
5 // Siemens Product Lifecycle Management Software Inc.
6 // All Rights Reserved.
7 // ==================================================
8 // Copyright 2022 Siemens Digital Industries Software
9 /*===============================================================================
10  Date Name Description of Change
11  04-Nov-2013 Johann Chemin-Danielson Creation
12  $HISTORY$
13  =============================================================================*/
14 
21 #ifndef TEAMCENTER_CORE_LOGGED_IN_USER_HXX
22 #define TEAMCENTER_CORE_LOGGED_IN_USER_HXX
23 
24 #include <unidefs.h>
25 
26 #include <tc/libtc_exports.h>
27 
28 namespace Teamcenter
29 {
30  namespace Core
31  {
35  class TC_API LoggedInUser
36  {
37  public:
41  static LoggedInUser* getInstance();
42 
46  virtual const char* getCurrentUserID() = 0;
47 
51  virtual logical isUserPrivileged () = 0;
52 
56  virtual logical isUserSystemAdministrator() = 0;
57 
63  virtual logical isUserGroupAdministrator( const char* groupName ) = 0;
64 
70  virtual logical isUserGroupAdministrator( tag_t groupTag ) = 0;
71 
75  virtual tag_t getCurrentUserTag () = 0;
76 
80  virtual tag_t getCurrentGroupTag () = 0;
81 
87  virtual logical isGroupCurrentGroup( const char* groupName ) = 0;
88 
92  virtual tag_t getCurrentRoleTag () = 0;
93 
99  virtual logical isRoleCurrentRole( const char* roleName ) = 0;
100 
107  virtual logical isAMemberOfGroupAndRole( const char* groupName, const char* roleName ) = 0;
108 
109  protected:
110  LoggedInUser();
111  LoggedInUser(const LoggedInUser&);
112  LoggedInUser& operator = ( const LoggedInUser& );
113  virtual ~LoggedInUser();
114  };
115  }
116 }
117 #include <tc/libtc_undef.h>
118 #endif