NewsFeed::NewsFeed(QWidget *parent) : QTextBrowser(parent) { m_timer = new QTimer(this); connect( this, SIGNAL(anchorClicked(const QUrl&)), SLOT(linkClicked(const QUrl&)) ); connect(m_timer, SIGNAL(timeout()), SLOT(getUpdates())); }
ContactPointLevelingPage::ContactPointLevelingPage(QWidget *parent) : QWizardPage(parent), ui(new Ui::ContactPointLevelingPage) { this->setAttribute(Qt::WA_DeleteOnClose); _id = (ContactPointLevelingPage::next_id++); _contactor = false; ui->setupUi(this); connect(&_getUpdateTimer,SIGNAL(timeout()),this, SLOT(getUpdates())); _getUpdateTimer.start( 1000 ); }
Status checkAuthForWriteCommand(AuthorizationSession* authzSession, BatchedCommandRequest::BatchType cmdType, const OpMsgRequest& request) { std::vector<Privilege> privileges; ActionSet actionsOnCommandNSS; if (shouldBypassDocumentValidationForCommand(request.body)) { actionsOnCommandNSS.addAction(ActionType::bypassDocumentValidation); } NamespaceString cmdNSS; if (cmdType == BatchedCommandRequest::BatchType_Insert) { auto op = Insert::parse(IDLParserErrorContext("insert"), request); cmdNSS = op.getNamespace(); if (!op.getNamespace().isSystemDotIndexes()) { actionsOnCommandNSS.addAction(ActionType::insert); } else { // Special-case indexes until we have a command const auto swNssToIndex = getIndexedNss(op.getDocuments()); if (!swNssToIndex.isOK()) { return swNssToIndex.getStatus(); } const auto& nssToIndex = swNssToIndex.getValue(); privileges.push_back( Privilege(ResourcePattern::forExactNamespace(nssToIndex), ActionType::createIndex)); } } else if (cmdType == BatchedCommandRequest::BatchType_Update) { auto op = Update::parse(IDLParserErrorContext("update"), request); cmdNSS = op.getNamespace(); actionsOnCommandNSS.addAction(ActionType::update); // Upsert also requires insert privs if (containsUpserts(op.getUpdates())) { actionsOnCommandNSS.addAction(ActionType::insert); } } else { fassert(17251, cmdType == BatchedCommandRequest::BatchType_Delete); auto op = Delete::parse(IDLParserErrorContext("delete"), request); cmdNSS = op.getNamespace(); actionsOnCommandNSS.addAction(ActionType::remove); } if (!actionsOnCommandNSS.empty()) { privileges.emplace_back(ResourcePattern::forExactNamespace(cmdNSS), actionsOnCommandNSS); } if (authzSession->isAuthorizedForPrivileges(privileges)) return Status::OK(); return Status(ErrorCodes::Unauthorized, "unauthorized"); }
ProductVersionList AbstractUpdater::allUpdates () const { return getUpdates (AllUpdates); }
ProductVersionList AbstractUpdater::availableUpdates () const { return getUpdates (AvailableUpdates); }