mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Use new Event object in menu signals
This commit is contained in:
parent
a88530a640
commit
ae93c2707c
@ -137,7 +137,7 @@ class ChatPlugin(IndicoPlugin):
|
||||
visible=lambda event: bool(ChatroomEventAssociation.find_for_event(event).count()))
|
||||
|
||||
def extend_event_management_menu(self, sender, event, **kwargs):
|
||||
if event.canModify(session.user) or is_chat_admin(session.user):
|
||||
if event.can_manage(session.user) or is_chat_admin(session.user):
|
||||
return 'chat-management', SideMenuItem('Chat Rooms', url_for_plugin('chat.manage_rooms', event),
|
||||
section='services')
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ class PiwikPlugin(IndicoPlugin):
|
||||
**event_tracking_params)
|
||||
|
||||
def add_sidemenu_item(self, sender, event, **kwargs):
|
||||
if event.canModify(session.user):
|
||||
if event.can_manage(session.user):
|
||||
menu_item = SideMenuItem(_("Statistics"), url_for_plugin('piwik.view', event), section='reports')
|
||||
return 'statistics', menu_item
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user