MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / init

Method init

sources/api/BaseAPI.cpp:110–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void BaseAPI::init()
111{
112 bool apiAuthRequired = _accessManager->isAuthRequired();
113
114 // For security we block external connections if default PW is set
115 if (!_localConnection && BaseAPI::hasHyperhdrDefaultPw())
116 {
117 emit SignalPerformClientDisconnection();
118 }
119
120 // if this is localConnection and network allows unauth locals, set authorized flag
121 if (apiAuthRequired && _localConnection)
122 _authorized = !_accessManager->isLocalAuthRequired();
123
124 // admin access is allowed, when the connection is local and the option for local admin isn't set. Con: All local connections get full access
125 if (_localConnection)
126 {
127 _adminAuthorized = !_accessManager->isLocalAdminAuthRequired();
128 // just in positive direction
129 if (_adminAuthorized)
130 _authorized = true;
131 }
132}
133
134bool BaseAPI::setHyperhdrInstance(quint8 inst)
135{

Callers 2

jquery.i18n.jsFile · 0.45

Calls 3

isAuthRequiredMethod · 0.80
isLocalAuthRequiredMethod · 0.80

Tested by

no test coverage detected