--- a/src/pyams_notify/views/context.py Mon Sep 11 15:06:26 2017 +0200
+++ b/src/pyams_notify/views/context.py Tue Sep 12 11:13:34 2017 +0200
@@ -10,15 +10,16 @@
# FOR A PARTICULAR PURPOSE.
#
-
__docformat__ = 'restructuredtext'
# import standard library
# import interfaces
+from pyams_notify.interfaces import INotificationHandler
# import packages
+from pyams_notify.event import Notification
from pyramid.view import view_config
@@ -26,7 +27,12 @@
def NotificationsContextView(request):
"""Get context for notifications"""
principal = request.principal
+ notification = Notification(request,
+ action='none',
+ category='notifications.query',
+ message='')
+ adapters = [name for name, adapter in request.registry.getAdapters((notification, ), INotificationHandler)]
return {'principal': {'id': principal.id,
'title': principal.title,
'principals': tuple(request.effective_principals)},
- 'context': {'*': ['user.login', 'content.workflow']}}
+ 'context': {'*': adapters}}