OpenSlides/openslides/mediafile/main_menu.py

20 lines
599 B
Python
Raw Normal View History

from django.utils.translation import ugettext_lazy
from openslides.utils.main_menu import MainMenuEntry
class MediafileMainMenuEntry(MainMenuEntry):
"""
Main menu entry for the mediafile app.
"""
verbose_name = ugettext_lazy('Files')
default_weight = 60
pattern_name = 'mediafile_list'
2015-01-17 13:31:06 +01:00
icon_css_class = 'glyphicon-paperclip'
def check_permission(self):
return (
self.request.user.has_perm('mediafile.can_see') or
self.request.user.has_perm('mediafile.can_upload') or
self.request.user.has_perm('mediafile.can_manage'))