コード例 #1
0
ファイル: handlers.py プロジェクト: arturodr/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        if 'startDate' in self._params:
            self._startDate = self._params['startDate']
        if 'endDate' in self._params:
            self._endDate = self._params['endDate']
コード例 #2
0
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        if 'startDate' in self._params:
            self._startDate = self._params['startDate']
        if 'endDate' in self._params:
            self._endDate = self._params['endDate']
コード例 #3
0
ファイル: handlers.py プロジェクト: pferreir/indico-backup
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        if "startDate" in self._params:
            self._startDate = self._params["startDate"]
        if "endDate" in self._params:
            self._endDate = self._params["endDate"]
コード例 #4
0
ファイル: reviewing.py プロジェクト: pferreir/indico-backup
 def _checkProtection(self):
     if self._target.getConference().hasEnabledSection("paperReviewing"):
         ConferenceModifBase._checkProtection(self)
     else:
         raise ServiceError(
             "ERR-REV1a",
             _("Paper Reviewing is not active for this conference"))
コード例 #5
0
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)
        pm = ParameterManager(self._params)
        self.params = {}

        self.params["type"] = pm.extract("type",
                                         pType=str,
                                         allowEmpty=False,
                                         defaultValue="text")
        self.params["id"] = pm.extract("id", pType=str, allowEmpty=True)
        self.params["caption"] = pm.extract("caption",
                                            pType=str,
                                            allowEmpty=False)
        self.params["isMandatory"] = pm.extract("isMandatory",
                                                pType=bool,
                                                allowEmpty=True,
                                                defaultValue=False)

        if self.params["type"] == "textarea" or self.params["type"] == "input":
            self.params["maxLength"] = pm.extract("maxLength",
                                                  pType=int,
                                                  allowEmpty=True,
                                                  defaultValue=0)
            self.params["limitation"] = pm.extract("limitation",
                                                   pType=str,
                                                   allowEmpty=True,
                                                   defaultValue="chars")
        elif self.params["type"] == "selection":
            self.params["options"] = pm.extract("options",
                                                pType=list,
                                                allowEmpty=False)
コード例 #6
0
ファイル: abstracts.py プロジェクト: arturodr/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     submitterId = pm.extract("submitterId", pType=str, allowEmpty=False)
     abstractId = pm.extract("abstractId", pType=str, allowEmpty=False)
     self._abstract = self._conf.getAbstractMgr().getAbstractById(abstractId)
     self._submitter = user.AvatarHolder().getById(submitterId)
コード例 #7
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     ah = AvatarHolder()
     userId = pm.extract("userId", pType=str, allowEmpty=False)
     self._user = ah.getById(userId)
     if self._user == None:
         raise ServiceError("ERR-U0", _("User '%s' does not exist.") % userId)
コード例 #8
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     submitterId = pm.extract("submitterId", pType=str, allowEmpty=False)
     abstractId = pm.extract("abstractId", pType=str, allowEmpty=False)
     self._abstract = self._conf.getAbstractMgr().getAbstractById(abstractId)
     self._submitter = user.AvatarHolder().getById(submitterId)
     if self._submitter is None:
         raise NoReportError(_("The user that you are changing does not exist anymore in the database"))
コード例 #9
0
ファイル: services.py プロジェクト: Ictp/indico
    def _checkCanManagePlugin(self, plugin):
        isAdminOnlyPlugin = CollaborationTools.isAdminOnlyPlugin(plugin)

        hasAdminRights = RCCollaborationAdmin.hasRights(self._getUser()) or RCCollaborationPluginAdmin.hasRights(self._getUser(), [plugin])

        if not hasAdminRights and isAdminOnlyPlugin:
            raise CollaborationException(_("Cannot acces service of admin-only plugin if user is not admin, for event: ") + str(self._conf.getId()) + _(" with the service ") + str(self.__class__) )

        elif not hasAdminRights and not RCVideoServicesManager.hasRights(self._getUser(), self._conf, [plugin]):
            #we check if it's an event creator / manager (this will call ConferenceModifBase._checkProtection)
            ConferenceModifBase._checkProtection(self)
コード例 #10
0
ファイル: services.py プロジェクト: aninhalacerda/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self.uniqueIdList = self._params["uniqueIdList"]

        self.emailToList = []

        self.fromEmail = self._params["from"]
        self.content = self._params["content"]
        manager = self._conf.getCSBookingManager()
        for uniqueId in self.uniqueIdList:
            self.emailToList.extend(manager.getSpeakerEmailByUniqueId(uniqueId, self._aw.getUser()))
コード例 #11
0
ファイル: abstracts.py プロジェクト: NIIF/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)
        pm = ParameterManager(self._params)
        self.params = {}

        self.params["type"] = pm.extract("type", pType=str, allowEmpty=False, defaultValue="text")
        self.params["id"] = pm.extract("id", pType=str, allowEmpty=True)
        self.params["caption"] = pm.extract("caption", pType=str, allowEmpty=False)
        self.params["isMandatory"] = pm.extract("isMandatory", pType=bool, allowEmpty=True, defaultValue=False)

        if self.params["type"] == "textarea" or self.params["type"] == "input":
            self.params["maxLength"] = pm.extract("maxLength", pType=int, allowEmpty=True, defaultValue=0)
            self.params["limitation"] = pm.extract("limitation", pType=str, allowEmpty=True, defaultValue="chars")
        elif self.params["type"] == "selection":
            self.params["options"] = pm.extract("options", pType=list, allowEmpty=False)
コード例 #12
0
ファイル: services.py プロジェクト: Ictp/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self._pm = ParameterManager(self._params)
        self.uniqueIdList = self._pm.extract("uniqueIdList", list, False, [])
        fromMail = self._pm.extract("from", dict, False, {})
        self.fromEmail = fromMail['email']
        self.fromName = fromMail['name']
        self.content = self._pm.extract("content", str, False, "")
        p_cc = self._pm.extract("cc", str, True, "").strip()
        self.cc = setValidEmailSeparators(p_cc).split(',') if p_cc else []
        self.emailToList = []
        manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
        for uniqueId in self.uniqueIdList:
            spk = manager.getSpeakerWrapperByUniqueId(uniqueId)
            if spk.getStatus() not in [SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE]:
                self.emailToList.extend(manager.getSpeakerEmailByUniqueId(uniqueId, self._aw.getUser()))
コード例 #13
0
    def _checkCanManagePlugin(self, plugin):
        isAdminOnlyPlugin = CollaborationTools.isAdminOnlyPlugin(plugin)

        hasAdminRights = RCCollaborationAdmin.hasRights(
            self._getUser()) or RCCollaborationPluginAdmin.hasRights(
                self._getUser(), [plugin])

        if not hasAdminRights and isAdminOnlyPlugin:
            raise CollaborationException(
                _("Cannot acces service of admin-only plugin if user is not admin, for event: "
                  ) + str(self._conf.getId()) + _(" with the service ") +
                str(self.__class__))

        elif not hasAdminRights and not RCVideoServicesManager.hasRights(
                self._getUser(), self._conf, [plugin]):
            #we check if it's an event creator / manager (this will call ConferenceModifBase._checkProtection)
            ConferenceModifBase._checkProtection(self)
コード例 #14
0
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self._pm = ParameterManager(self._params)
        self.uniqueIdList = self._pm.extract("uniqueIdList", list, False, [])
        fromMail = self._pm.extract("from", dict, False, {})
        self.fromEmail = fromMail['email']
        self.fromName = fromMail['name']
        self.content = self._pm.extract("content", str, False, "")
        p_cc = self._pm.extract("cc", str, True, "").strip()
        self.cc = setValidEmailSeparators(p_cc).split(',') if p_cc else []
        self.emailToList = []
        manager = self._conf.getCSBookingManager()
        for uniqueId in self.uniqueIdList:
            spk = manager.getSpeakerWrapperByUniqueId(uniqueId)
            if spk.getStatus() not in [
                    SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE
            ]:
                self.emailToList.extend(
                    manager.getSpeakerEmailByUniqueId(uniqueId,
                                                      self._aw.getUser()))
コード例 #15
0
ファイル: services.py プロジェクト: aninhalacerda/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self.newEmailAddress = self._params["value"]
        self.spkId = self._params["spkId"]
コード例 #16
0
 def _checkProtection(self):
     if not self._target.canManageRegistration(self.getAW().getUser()):
         ConferenceModifBase._checkProtection(self)
コード例 #17
0
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self.newEmailAddress = self._params['value']
        self.spkId = self._params['spkId']
コード例 #18
0
ファイル: services.py プロジェクト: Ictp/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self.contList = self._params['contList']
     self.userId = self._params['userId']
コード例 #19
0
ファイル: reviewing.py プロジェクト: pferreir/indico-backup
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._confPaperReview = self._conf.getConfPaperReview()
     self._confAbstractReview = self._conf.getConfAbstractReview()
コード例 #20
0
ファイル: services.py プロジェクト: cmorgia/indicoaffiliation
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     self._limits = pm.extract("limits", pType=list, allowEmpty=False)
コード例 #21
0
ファイル: services.py プロジェクト: Ictp/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._CSManager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
コード例 #22
0
ファイル: services.py プロジェクト: Ictp/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self) #sets self._target = self._conf = the Conference object
     self._CSBookingManager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
コード例 #23
0
ファイル: registration.py プロジェクト: svdoever/indico
 def _checkProtection(self):
     if not self._target.canManageRegistration(self.getAW().getUser()):
         ConferenceModifBase._checkProtection(self)
コード例 #24
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     ReportNumberRemove._checkParams(self)
コード例 #25
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._CSManager = Catalog.getIdx("cs_bookingmanager_conference").get(
         self._conf.getId())
コード例 #26
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self.contList = self._params['contList']
     self.userId = self._params['userId']
コード例 #27
0
ファイル: services.py プロジェクト: aninhalacerda/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self.contList = self._params["contList"]
     self.userId = self._params["userId"]
コード例 #28
0
ファイル: reviewing.py プロジェクト: dbourillot/indico
 def _checkProtection(self):
     if self._target.getConference().hasEnabledSection("paperReviewing"):
         ConferenceModifBase._checkProtection(self)
     else:
         raise ServiceError("ERR-REV1a",_("Paper Reviewing is not active for this conference"))
コード例 #29
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     self._registrant_ids = pm.extract("registrants",
                                       pType=list,
                                       allowEmpty=False)
コード例 #30
0
ファイル: reviewing.py プロジェクト: davidmorrison/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._confReview = self._conf.getConfReview()
コード例 #31
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._event = self._conf.as_event
     self._confPaperReview = self._conf.getConfPaperReview()
コード例 #32
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._event = self._conf.as_event
     self._confPaperReview = self._conf.getConfPaperReview()
コード例 #33
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._CSManager = self._conf.getCSBookingManager()
コード例 #34
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     self._userList = pm.extract("userList", pType=list, allowEmpty=False)
コード例 #35
0
ファイル: services.py プロジェクト: Ictp/indico
    def _checkParams(self):
        ConferenceModifBase._checkParams(self)

        self.newEmailAddress = self._params['value']
        self.spkId = self._params['spkId']
コード例 #36
0
ファイル: collaboration.py プロジェクト: bubbas/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self) #sets self._target = self._conf = the Conference object
     self._checkCollaborationEnabled()
     self._CSBookingManager = self._conf.getCSBookingManager()
コード例 #37
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(
         self)  #sets self._target = self._conf = the Conference object
     self._checkCollaborationEnabled()
     self._CSBookingManager = self._conf.getCSBookingManager()
コード例 #38
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(
         self)  #sets self._target = self._conf = the Conference object
     self._CSBookingManager = Catalog.getIdx(
         "cs_bookingmanager_conference").get(self._conf.getId())
コード例 #39
0
 def process(self):
     try:
         return ConferenceModifBase.process(self)
     except CollaborationException, e:
         raise CollaborationServiceException(e.getMsg(), str(e.getInner()))
コード例 #40
0
ファイル: services.py プロジェクト: pedrogaudencio/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._CSManager = self._conf.getCSBookingManager()
コード例 #41
0
ファイル: services.py プロジェクト: Ictp/indico
 def process(self):
     try:
         return ConferenceModifBase.process(self)
     except CollaborationException, e:
         raise CollaborationServiceException(e.getMessage(), str(e.getInner()))
コード例 #42
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     pm = ParameterManager(self._params)
     self.fieldId = pm.extract("id", pType=str, allowEmpty=False)
コード例 #43
0
ファイル: reviewing.py プロジェクト: dbourillot/indico
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._confPaperReview = self._conf.getConfPaperReview()
     self._confAbstractReview = self._conf.getConfAbstractReview()
コード例 #44
0
 def _checkParams(self):
     ConferenceModifBase._checkParams(self)
     self._confReview = self._conf.getConfReview()