1 #ifndef _ots_Utilities_RemoteWebUsers_h
2 #define _ots_Utilities_RemoteWebUsers_h
4 #include "xgi/Method.h"
5 #include "otsdaq-core/SOAPUtilities/SOAPMessenger.h"
6 #include "otsdaq-core/ConfigurationDataFormats/ConfigurationGroupKey.h"
16 class AllSupervisorInfo;
17 class HttpXmlDocument;
26 COOKIE_CODE_LENGTH = 512,
29 static const std::string REQ_NO_LOGIN_RESPONSE;
30 static const std::string REQ_NO_PERMISSION_RESPONSE;
31 static const std::string REQ_USER_LOCKOUT_RESPONSE;
32 static const std::string REQ_LOCK_REQUIRED_RESPONSE;
33 static const std::string REQ_ALLOW_NO_USER;
40 std::ostringstream* out,
43 uint8_t* userPermissions = 0,
44 const bool refresh =
true,
45 const uint8_t permissionsThreshold = 1,
46 const bool checkLock =
false,
47 const bool lockRequired =
false,
48 std::string* userWithLock = 0,
49 std::string* username = 0,
50 std::string* displayName = 0,
51 uint64_t* activeSessionIndex = 0,
52 const bool allowNoUser =
false);
55 std::string getActiveUserList (XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor);
56 void sendSystemMessage (XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor,
const std::string &toUser,
const std::string& msg);
57 void makeSystemLogbookEntry (XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor,
const std::string &entryText);
58 std::pair<std::string ,
ConfigurationGroupKey> getLastConfigGroup (XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor,
const std::string &actionOfLastGroup, std::string &actionTimeString);
61 bool cookieCodeIsActiveForRequest(
62 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor,
63 std::string& cookieCode,
64 uint8_t* userPermissions = 0,
67 std::string* userWithLock = 0);
69 bool getUserInfoForCookie(
70 XDAQ_CONST_CALL xdaq::ApplicationDescriptor* supervisorDescriptor,
71 std::string& cookieCode,
72 std::string* userName,
73 std::string* displayName = 0,
74 uint64_t* activeSessionIndex = 0);
78 std::string ActiveUserList_;
79 time_t ActiveUserLastUpdateTime_;
82 ACTIVE_USERS_UPDATE_THRESHOLD = 10,
85 std::string tmpUserWithLock_;
86 uint8_t tmpUserPermissions_;