31 #ifndef LIBHOMEGEAR_BASE_ACLS_H 32 #define LIBHOMEGEAR_BASE_ACLS_H 35 #include "../Output/Output.h" 52 int32_t _clientId = -1;
54 std::mutex _aclsMutex;
55 std::vector<PAcl> _acls;
60 bool categoriesReadSet();
61 bool categoriesWriteSet();
64 bool devicesReadSet();
65 bool devicesWriteSet();
68 bool buildingPartsReadSet();
69 bool buildingPartsWriteSet();
70 bool buildingPartsRoomsCategoriesRolesDevicesReadSet();
71 bool buildingPartsRoomsCategoriesRolesDevicesWriteSet();
72 bool variablesReadSet();
73 bool variablesWriteSet();
74 bool variablesBuildingPartsRoomsCategoriesRolesDevicesReadSet();
75 bool variablesBuildingPartsRoomsCategoriesRolesDevicesWriteSet();
76 bool variablesBuildingPartsRoomsCategoriesRolesReadSet();
77 bool variablesBuildingPartsRoomsCategoriesRolesWriteSet();
80 bool fromUser(std::string &userName);
81 bool fromGroups(std::vector<uint64_t> &groupIds);
84 void fromVariable(
PVariable serializedData);
92 bool checkServiceAccess(std::string serviceName);
100 bool checkCategoriesReadAccess(std::set<uint64_t> &categories);
108 bool checkCategoriesWriteAccess(std::set<uint64_t> &categories);
116 bool checkCategoryReadAccess(uint64_t categoryId);
124 bool checkCategoryWriteAccess(uint64_t categoryId);
132 bool checkRolesReadAccess(std::set<uint64_t> &roles);
140 bool checkRolesWriteAccess(std::set<uint64_t> &roles);
148 bool checkRoleReadAccess(uint64_t roleId);
156 bool checkRoleWriteAccess(uint64_t roleId);
164 bool checkDeviceReadAccess(std::shared_ptr<Systems::Peer> peer);
172 bool checkDeviceWriteAccess(std::shared_ptr<Systems::Peer> peer);
180 bool checkEventServerMethodAccess(std::string methodName);
188 bool checkMethodAccess(std::string methodName);
197 bool checkMethodAndCategoryReadAccess(std::string methodName, uint64_t categoryId);
206 bool checkMethodAndCategoryWriteAccess(std::string methodName, uint64_t categoryId);
215 bool checkMethodAndRoleReadAccess(std::string methodName, uint64_t roleId);
224 bool checkMethodAndRoleWriteAccess(std::string methodName, uint64_t roleId);
233 bool checkMethodAndRoomReadAccess(std::string methodName, uint64_t roomId);
242 bool checkMethodAndRoomWriteAccess(std::string methodName, uint64_t roomId);
251 bool checkMethodAndBuildingPartReadAccess(std::string methodName, uint64_t buildingPartId);
260 bool checkMethodAndBuildingPartWriteAccess(std::string methodName, uint64_t buildingPartId);
269 bool checkMethodAndDeviceWriteAccess(std::string methodName, uint64_t
peerId);
278 bool checkNodeBlueVariableReadAccess(
const std::string &nodeId, int32_t
input);
287 bool checkNodeBlueVariableWriteAccess(
const std::string &nodeId, int32_t input);
295 bool checkRoomReadAccess(uint64_t roomId);
303 bool checkRoomWriteAccess(uint64_t roomId);
311 bool checkBuildingPartReadAccess(uint64_t buildingPartId);
319 bool checkBuildingPartWriteAccess(uint64_t buildingPartId);
345 bool checkVariableReadAccess(std::shared_ptr<Systems::Peer> peer, int32_t
channel,
const std::string &variableName);
355 bool checkVariableWriteAccess(std::shared_ptr<Systems::Peer> peer, int32_t channel,
const std::string &variableName);
357 typedef std::shared_ptr<Acls>
PAcls;
This is the base library main class.
Definition: BaseLib.h:95
std::shared_ptr< SystemVariable > PSystemVariable
Definition: IDatabaseController.h:51
Definition: BaseLib.cpp:34
Class to print output of different kinds to the standard and error output.
Definition: Output.h:54
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
int32_t channel
Definition: UiElements.h:215
std::shared_ptr< Acls > PAcls
Definition: Acls.h:357
uint64_t peerId
Definition: UiElements.h:214