Changeset eecd42 in indico
- Timestamp:
- 05/19/11 10:38:14 (2 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- f4c27d
- Parents:
- e8a463
- git-author:
- Alexis Castilla Hernandez <alexis.castilla.hernandez@…> (05/13/11 17:37:24)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (05/19/11 10:38:14)
- Location:
- indico/MaKaC
- Files:
-
- 3 edited
-
review.py (modified) (1 diff)
-
webinterface/pages/abstracts.py (modified) (2 diffs)
-
webinterface/rh/CFADisplay.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/review.py
r066e66 reecd42 937 937 res.append( abstract ) 938 938 return res 939 940 def getAbstractListForPrimaryAuthorEmail(self, email): 941 ''' Get list of abstracts where the email belongs to a primary author 942 ''' 943 res = [] 944 for abs in self._abstracts.values(): 945 for author in abs.getPrimaryAuthorList(): 946 if email == author.getEmail(): 947 res.append(abs) 948 return res 949 950 def getAbstractListForCoAuthorEmail(self, email): 951 ''' Get list of abstracts where the email belongs to a co-author 952 ''' 953 res = [] 954 for abs in self._abstracts.values(): 955 for author in abs.getCoAuthorList(): 956 if email == author.getEmail(): 957 res.append(abs) 958 return res 959 960 def isInAuthorizedViewList(self, user, abstract): 961 ''' Check if the user is submitter, primary author or co-author of the abstract 962 ''' 963 # Check if the user is a submitter 964 if abstract.isSubmitter(user): 965 return True 966 # Check if the user is a primary author 967 for author in abstract.getPrimaryAuthorList(): 968 if user.getEmail() == author.getEmail(): 969 return True 970 # Check if the user is a co-author 971 for author in abstract.getCoAuthorList(): 972 if user.getEmail() == author.getEmail(): 973 return True 974 return False 939 975 940 976 def getNotificationTplList(self): -
indico/MaKaC/webinterface/pages/abstracts.py
r084dec reecd42 187 187 tz = tzUtil.getDisplayTZ() 188 188 189 asPrimaryAuthor = cfaMgr.getAbstractListForPrimaryAuthorEmail(self._aw.getUser().getEmail()) 190 asCoAuthor = cfaMgr.getAbstractListForCoAuthorEmail(self._aw.getUser().getEmail()) 189 191 l = cfaMgr.getAbstractListForAvatar( self._aw.getUser() ) 192 for abs in asPrimaryAuthor: 193 if not abs in l: 194 l.append(abs) 195 for abs in asCoAuthor: 196 if not abs in l: 197 l.append(abs) 198 199 l = sorted(l, key=lambda i:int(i.getId())) 200 190 201 if not l: 191 202 vars["abstracts"] = _("""<tr> … … 204 215 statusLabel = _("ACCEPTED") 205 216 if status.getType() is not None and status.getType()!="": 206 statusLabel="%s as %s"%(statusLabel,status.getType() )217 statusLabel="%s as %s"%(statusLabel,status.getType().getName()) 207 218 elif isinstance( status, review.AbstractStatusRejected ): 208 219 statusLabel = _("REJECTED") -
indico/MaKaC/webinterface/rh/CFADisplay.py
re87fe4 reecd42 536 536 class RHAbstractDisplay( RHAbstractDisplayBase ): 537 537 _uh = urlHandlers.UHAbstractDisplay 538 539 def _checkProtection(self): 540 if self._abstract is None: 541 raise MaKaCError( _("The abstract you are trying to access does not exist")) 542 if not self._conf.getAbstractMgr().isInAuthorizedViewList(self._getUser(), self._abstract): 543 RHAbstractSubmissionBase._checkProtection(self) 538 544 539 545 def _processIfActive( self ):
Note: See TracChangeset
for help on using the changeset viewer.
