[Mpuls-commits] r5590 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 16 10:15:53 CET 2011
Author: torsten
Date: 2011-11-16 10:15:53 +0100 (Wed, 16 Nov 2011)
New Revision: 5590
Modified:
base/trunk/mpulsweb/controllers/mpuls.py
Log:
Call "apply_hooks" regardless on the role of the user. Rolechecks should be
done in the apply_hooks function.
Modified: base/trunk/mpulsweb/controllers/mpuls.py
===================================================================
--- base/trunk/mpulsweb/controllers/mpuls.py 2011-11-16 09:14:42 UTC (rev 5589)
+++ base/trunk/mpulsweb/controllers/mpuls.py 2011-11-16 09:15:53 UTC (rev 5590)
@@ -38,9 +38,8 @@
log.debug('Loading global appointment list')
c.globalappointmentlist = self.get_global_appointments()
- if h.hasRole(['cm']):
- self.apply_hooks()
-
+ self.apply_hooks()
+
return render('/home/home.mako')
def apply_hooks(self):
@@ -51,17 +50,17 @@
def get_newslist(self, user):
""" Return an agency wide newslist """
-
+
return NewsList(user)
def get_global_appointments(self):
""" Return agency wide appointments """
-
+
return GlobalAppointmentOverview()
def get_case_appointments(self):
""" Return the user's appointments and reminders """
-
+
appointment_list = CaseAppointmentOverview()
return appointment_list
@@ -72,12 +71,12 @@
remindlist = MaxSaveTimeReminderOverview()
if h.hasRole(['cm']):
remindlist.join(CaseReminderOverview())
-
+
if h.hasRole(['cm']):
remindlist.join(TagsReminderOverview())
-
+
remindlist.sort()
-
+
return remindlist
More information about the Mpuls-commits
mailing list