Changeset 7251 for main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
- Timestamp:
- 2 Dec 2011, 12:47:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7248 r7251 114 114 115 115 class OnlinePaymentBreadcrumb(Breadcrumb): 116 """A breadcrumb for course lists.116 """A breadcrumb for payments. 117 117 """ 118 118 grok.context(IStudentOnlinePayment) … … 987 987 988 988 def unremovable(self, ticket): 989 prm = get_principal_role_manager() 990 roles = [x[0] for x in prm.getRolesForPrincipal(self.request.principal.id)] 991 return ('waeup.Student' in roles and ticket.r_code) 989 usertype = getattr(self.request.principal, 'user_type', None) 990 if not usertype: 991 return False 992 return (self.request.principal.user_type == 'student' and ticket.r_code) 992 993 993 994 def formatDatetime(self,datetimeobj): … … 1085 1086 ticket.p_session == p_session: 1086 1087 self.flash( 1087 'This type of payment ticket exists and ticket has been paid.')1088 'This type of payment has already been made.') 1088 1089 self.redirect(self.url(self.context)) 1089 1090 return
Note: See TracChangeset for help on using the changeset viewer.