Early propagate of access rights to connection.
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index cc15d7c..17ef4d9 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -219,8 +219,8 @@
     bool done = ssecurity->processMsg(this);
     if (done) {
       state_ = RFBSTATE_QUERYING;
-      queryConnection(ssecurity->getUserName());
       setAccessRights(ssecurity->getAccessRights());
+      queryConnection(ssecurity->getUserName());
     }
   } catch (AuthFailureException& e) {
     vlog.error("AuthFailureException: %s", e.str());