Пример #1
0
 def index_context():
     return dict(
         easy_search_form=EasySearchForm(csrf_enabled=False),
         format_record=cached_format_record,
         get_creation_date=get_creation_date,
         unregistered=(not current_user.is_authenticated())
     )
Пример #2
0
 def is_accessible(self):
     """
     Check if admin interface is accessible by the current user
     """
     if not current_user.is_authenticated():
         return False
     return self.can_view
 def is_authorized(self):
     return current_user.is_authenticated()
Пример #4
0
 def is_authorized(self):
     return current_user.is_authenticated() and \
            current_user.is_authorized('usegroups')
Пример #5
0
 def is_authorized(self):
     return current_user.is_authenticated()
 def is_authorized(self):
     return current_user.is_authenticated() and \
            current_user.is_authorized('usemessages')