Ejemplo n.º 1
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate = False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
         return
     RHSubmitMaterialBase._checkProtection(self)
Ejemplo n.º 2
0
class RHMaterialsAdd(RHSubContribModifBase):
    _uh = urlHandlers.UHSubContribModifAddMaterials

    def _checkProtection(self):
        material = self._rhSubmitMaterial._getMaterial()
        if self._target.canUserSubmit(self._aw.getUser()) \
            and material.getReviewingState() < 3:
            return
        RHSubContribModifBase._checkProtection(self)

    def _checkParams(self, params):
        RHSubContribModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        if self._target.getConference().isClosed():
            p = WPConferenceModificationClosed(self, self._target)
            return p.display()
        r = self._rhSubmitMaterial._process(self, self._getRequestParams())
        if r is None:
            self._redirect(self._uh.getURL(self._target))

        return r
Ejemplo n.º 3
0
class RHSubmitMaterial(RHContributionMaterialSubmissionRightsBase):
    
    def _checkProtection(self):
        RHContributionMaterialSubmissionRightsBase._checkProtection(self)
        if self._target.getReviewManager().getLastReview().isAuthorSubmitted():
            raise MaKaCError("You have already marked your materials as submitted")

    def _checkParams(self,params):
        RHContributionDisplay._checkParams(self,params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial=RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params) 

    def _process(self):
        wf=self.getWebFactory()
        if wf is None:
            url=urlHandlers.UHContributionDisplay.getURL(self._target)
            p=contributions.WPSubmitMaterial
        else:
            url=urlHandlers.UHConferenceDisplay.getURL(self._target.getConference())
            p=wf.getContribSubmitMaterial
        r=self._rhSubmitMaterial._process(self, self._getRequestParams()) #, p)
        if r is None:
            self._redirect(url)
        else:
            return r
Ejemplo n.º 4
0
class RHSubmitMaterial(RHContributionMaterialSubmissionRightsBase):
    def _checkProtection(self):
        RHContributionMaterialSubmissionRightsBase._checkProtection(self)
        if self._target.getReviewManager().getLastReview().isAuthorSubmitted():
            raise MaKaCError(
                "You have already marked your materials as submitted")

    def _checkParams(self, params):
        RHContributionDisplay._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        wf = self.getWebFactory()
        if wf is None:
            url = urlHandlers.UHContributionDisplay.getURL(self._target)
            p = contributions.WPSubmitMaterial
        else:
            url = urlHandlers.UHConferenceDisplay.getURL(
                self._target.getConference())
            p = wf.getContribSubmitMaterial
        r = self._rhSubmitMaterial._process(self,
                                            self._getRequestParams())  #, p)
        if r is None:
            self._redirect(url)
        else:
            return r
Ejemplo n.º 5
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate=False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
         return
     RHSubmitMaterialBase._checkProtection(self)
Ejemplo n.º 6
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate = False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
     elif not (RCContributionPaperReviewingStaff.hasRights(self, includingContentReviewer=False) and self._target.getReviewManager().getLastReview().isAuthorSubmitted()):
         RHSubmitMaterialBase._checkProtection(self)
     else:
         self._loggedIn = True
Ejemplo n.º 7
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate=False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
     elif not (RCContributionPaperReviewingStaff.hasRights(
             self, includingContentReviewer=False) and self._target.
               getReviewManager().getLastReview().isAuthorSubmitted()):
         RHSubmitMaterialBase._checkProtection(self)
     else:
         self._loggedIn = True
Ejemplo n.º 8
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate = False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
     # status = 3 means the paper is under review (submitted but not reviewed)
     # status = 2 means that the author has not yet submitted the material
     elif not (RCContributionPaperReviewingStaff.hasRights(self, includingContentReviewer=False) and  self._target.getReviewing().getReviewingState() in [2, 3]):
         RHSubmitMaterialBase._checkProtection(self)
     else:
         self._loggedIn = True
Ejemplo n.º 9
0
 def _checkProtection(self):
     material, _ = self._getMaterial(forceCreate = False)
     if self._target.canUserSubmit(self._aw.getUser()) \
         and (not material or material.getReviewingState() < 3):
         self._loggedIn = True
     # status = 3 means the paper is under review (submitted but not reviewed)
     # status = 2 means that the author has not yet submitted the material
     elif not (RCContributionPaperReviewingStaff.hasRights(self, includingContentReviewer=False)
               and self._target.getReviewing() and self._target.getReviewing().getReviewingState() in (2, 3)):
         RHSubmitMaterialBase._checkProtection(self)
     else:
         self._loggedIn = True
Ejemplo n.º 10
0
class RHAddMaterial( RHCategModifBase ):
    _uh = urlHandlers.UHCategoryAddMaterial
   
    def _checkParams( self, params ):
        RHCategModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial=RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process( self ):
        r=self._rhSubmitMaterial._process(self, self._getRequestParams())
        if r is None:
            self._redirect(self._uh.getURL(self._target))
        return r
Ejemplo n.º 11
0
class RHAddMaterial(RHCategModifBase):
    _uh = urlHandlers.UHCategoryAddMaterial

    def _checkParams(self, params):
        RHCategModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        r = self._rhSubmitMaterial._process(self, self._getRequestParams())
        if r is None:
            self._redirect(self._uh.getURL(self._target))
        return r
Ejemplo n.º 12
0
class RHMaterials(RHSubContribModifBase):
    _uh = urlHandlers.UHSubContribModifMaterials

    def _checkParams(self, params):
        RHSubContribModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        if self._target.getOwner().getOwner().isClosed():
            p = subContributions.WPSubContributionModificationClosed(self, self._target)
            return p.display()

        p = subContributions.WPSubContributionModifMaterials(self, self._target)
        return p.display(**self._getRequestParams())
Ejemplo n.º 13
0
class RHMaterials(RHSubContribModifBase):
    _uh = urlHandlers.UHSubContribModifMaterials

    def _checkParams(self, params):
        RHSubContribModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        if self._target.getOwner().getOwner().isClosed():
            p = subContributions.WPSubContributionModificationClosed(
                self, self._target)
            return p.display()

        p = subContributions.WPSubContributionModifMaterials(
            self, self._target)
        return p.display(**self._getRequestParams())
Ejemplo n.º 14
0
 def _process(self):
     result = RHSubmitMaterialBase._process(self)
     # if a Paper Reviewer uploads a paper, when the status is 'To be corrected', we must change the status to 'Submitted' again.
     if self._target.getReviewing() and self._target.getReviewing(
     ).getReviewingState(
     ) == 2 and RCContributionPaperReviewingStaff.hasRights(
             self, includingContentReviewer=False):
         self._target.getReviewManager().getLastReview().setAuthorSubmitted(
             True)
     return result
Ejemplo n.º 15
0
 def _process(self):
     result = RHSubmitMaterialBase._process(self)
     # if a Paper Reviewer uploads a paper, when the status is 'To be corrected', we must change the status to 'Submitted' again.
     if (
         self._target.getReviewing()
         and self._target.getReviewing().getReviewingState() == 2
         and RCContributionPaperReviewingStaff.hasRights(self, includingContentReviewer=False)
     ):
         self._target.getReviewManager().getLastReview().setAuthorSubmitted(True)
     return result
Ejemplo n.º 16
0
class RHSubmitMaterial(RHSubContributionDisplayBase):
    def _checkProtection(self):
        if not self._target.canModify(
                self.getAW()) and not self._target.canUserSubmit(
                    self.getAW().getUser()):
            if self._target.getModifKey() != "":
                raise ModificationError()
            if self._getUser() == None:
                self._checkSessionUser()
            else:
                raise ModificationError()

    #def _checkProtection(self):
    #    if self.getAW().getUser() is None:
    #        self._checkSessionUser()
    #    elif not self._target.canModify(self.getAW()):
    #        raise MaKaCError("you are not authorised to submit material for this subcontribution")

    def _checkParams(self, params):
        RHSubContributionDisplayBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        wf = self.getWebFactory()
        if wf is None:
            url = urlHandlers.UHSubContributionDisplay.getURL(self._target)
            p = subContributions.WPSubmitMaterial
        else:
            url = urlHandlers.UHConferenceDisplay.getURL(
                self._target.getConference())
            p = wf.getSubContribSubmitMaterial
        r = self._rhSubmitMaterial._process(self, self._getRequestParams(), p)
        if r is None:
            self._redirect(url)
        else:
            return r
Ejemplo n.º 17
0
class RHMaterialsAdd(RHSubContribModifBase):
    _uh = urlHandlers.UHSubContribModifAddMaterials

    def _checkProtection(self):
        material = self._rhSubmitMaterial._getMaterial()
        if self._target.canUserSubmit(self._aw.getUser()) and material.getReviewingState() < 3:
            return
        RHSubContribModifBase._checkProtection(self)

    def _checkParams(self, params):
        RHSubContribModifBase._checkParams(self, params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params)

    def _process(self):
        if self._target.getConference().isClosed():
            p = WPConferenceModificationClosed(self, self._target)
            return p.display()
        r = self._rhSubmitMaterial._process(self, self._getRequestParams())
        if r is None:
            self._redirect(self._uh.getURL(self._target))

        return r
Ejemplo n.º 18
0
class RHSubmitMaterial(RHSubContributionDisplayBase):

    def _checkProtection(self):
        if not self._target.canModify( self.getAW() ) and not self._target.canUserSubmit( self.getAW().getUser() ):
            if self._target.getModifKey() != "":
                raise ModificationError()
            if self._getUser() == None:
                self._checkSessionUser()
            else:
                raise ModificationError()
    
    #def _checkProtection(self):
    #    if self.getAW().getUser() is None:
    #        self._checkSessionUser()
    #    elif not self._target.canModify(self.getAW()):
    #        raise MaKaCError("you are not authorised to submit material for this subcontribution")

    def _checkParams(self,params):
        RHSubContributionDisplayBase._checkParams(self,params)
        if not hasattr(self, "_rhSubmitMaterial"):
            self._rhSubmitMaterial=RHSubmitMaterialBase(self._target, self)
        self._rhSubmitMaterial._checkParams(params) 

    def _process(self):
        wf=self.getWebFactory()
        if wf is None:
            url=urlHandlers.UHSubContributionDisplay.getURL(self._target)
            p=subContributions.WPSubmitMaterial
        else:
            url=urlHandlers.UHConferenceDisplay.getURL(self._target.getConference())
            p=wf.getSubContribSubmitMaterial
        r=self._rhSubmitMaterial._process(self, self._getRequestParams(), p)
        if r is None:
            self._redirect(url)
        else:
            return r
Ejemplo n.º 19
0
 def __init__(self):
     RHSessionModCoordinationBase.__init__(self)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 20
0
 def _checkParams(self, params):
     RHContribModifBaseSpecialSesCoordRights._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 21
0
 def _checkParams(self, params):
     RHSessionModCoordinationBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 22
0
 def _checkParams(self, params):
     RHCategModifBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 23
0
 def _checkParams(self, params):
     RHCategModifBase._checkParams(self, params)
     if not hasattr(self, "_rhSubmitMaterial"):
         self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
     self._rhSubmitMaterial._checkParams(params)
Ejemplo n.º 24
0
 def __init__(self, req):
     RHCategModifBase.__init__(self, req)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 25
0
 def _checkParams(self, params):
     RHSessionModCoordinationBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 26
0
 def _checkParams(self, params):
     RHSubContribModifBase._checkParams(self, params)
     if not hasattr(self, "_rhSubmitMaterial"):
         self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
     self._rhSubmitMaterial._checkParams(params)
Ejemplo n.º 27
0
 def __init__(self, req):
     RHCategModifBase.__init__(self, req)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 28
0
 def _checkParams(self,params):
     RHContributionDisplay._checkParams(self,params)
     if not hasattr(self, "_rhSubmitMaterial"):
         self._rhSubmitMaterial=RHSubmitMaterialBase(self._target, self)
     self._rhSubmitMaterial._checkParams(params) 
Ejemplo n.º 29
0
 def __init__(self, req):
     RHSessionModCoordinationBase.__init__(self, req)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 30
0
 def __init__(self):
     RHSubContribModifBase.__init__(self)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 31
0
 def __init__(self):
     RHContribModifBaseSpecialSesCoordRights.__init__(self)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 32
0
 def _checkParams(self, params):
     RHSubContribModifBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 33
0
 def __init__(self, req):
     RHSubContribModifBase.__init__(self, req)
     RHSubmitMaterialBase.__init__(self)
Ejemplo n.º 34
0
 def _checkParams(self, params):
     RHSubContributionDisplayBase._checkParams(self, params)
     if not hasattr(self, "_rhSubmitMaterial"):
         self._rhSubmitMaterial = RHSubmitMaterialBase(self._target, self)
     self._rhSubmitMaterial._checkParams(params)
Ejemplo n.º 35
0
 def _checkParams(self, params):
     RHCategModifBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)
Ejemplo n.º 36
0
 def _checkParams(self, params):
     RHSubContribModifBase._checkParams(self, params)
     RHSubmitMaterialBase._checkParams(self, params)