2013-12-09 23:56:01 +01:00
|
|
|
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
|
2015-03-09 15:40:54 +01:00
|
|
|
pattern_name = '/mediafiles'
|
2015-01-17 13:31:06 +01:00
|
|
|
icon_css_class = 'glyphicon-paperclip'
|
2013-12-09 23:56:01 +01:00
|
|
|
|
|
|
|
def check_permission(self):
|
|
|
|
return (
|
2015-03-26 05:36:10 +01:00
|
|
|
self.request.user.has_perm('mediafiles.can_see') or
|
|
|
|
self.request.user.has_perm('mediafiles.can_upload') or
|
|
|
|
self.request.user.has_perm('mediafiles.can_manage'))
|