diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/pvs.cpp | 13 | ||||
| -rwxr-xr-x | src/pvs.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/pvs.cpp b/src/pvs.cpp index 96a92ea..e0605c2 100755 --- a/src/pvs.cpp +++ b/src/pvs.cpp @@ -199,8 +199,11 @@ void PVS::onCommand(PVSMsg cmdMessage) if (ident.compare("INPUTEVENT") == 0) { InputEvent evt; - eventFromString(message, evt); - handleInputEvent(evt); + if(inputEventsAllowed()) + { + eventFromString(message, evt); + handleInputEvent(evt); + } } if (ident.compare("MCASTFTRETRY") == 0) { @@ -749,6 +752,12 @@ bool PVS::createMulticastTransfer(QString const& objectPath, quint64& transferID // Input handling +bool PVS::inputEventsAllowed() +{ + QString lecturer = getConfigValue("Permissions/vnc_lecturer"); + return r == "rw"; +} + void PVS::handleInputEvent(InputEvent const& evt) { QString s = evt.toString(); @@ -169,6 +169,7 @@ private: // input event handling: InputEventHandlerChain _inputEventHandlers; + bool inputEventsAllowed(); void handleInputEvent(InputEvent const& evt); void initializeInputEventHandling(); |
