Beispiel #1
0
 def get_context_data(self, **kwargs):
     context = super().get_context_data(**kwargs)
     context['INSTRUCTIONS_URL'] = settings.RESPA_ADMIN_INSTRUCTIONS_URL
     context['SUPPORT_EMAIL'] = settings.RESPA_ADMIN_SUPPORT_EMAIL
     if settings.RESPA_ADMIN_LOGO:
         context['logo_url'] = staticfiles_storage.url(
             'respa_admin/img/{0}'.format(settings.RESPA_ADMIN_LOGO))
     context['KORO_STYLE'] = settings.RESPA_ADMIN_KORO_STYLE
     context['user_is_any_admin'] = is_any_admin(self.request.user)
     return context
Beispiel #2
0
 def dispatch(self, request, *args, **kwargs):
     if not is_any_admin(request.user):
         raise Http404
     return super().dispatch(request, *args, **kwargs)
Beispiel #3
0
def can_search_users(user):
    return is_any_admin(user)
Beispiel #4
0
def can_access_permissions_view(user):
    return is_any_admin(user)
Beispiel #5
0
def can_search_users(user):
    return is_any_admin(user)
Beispiel #6
0
def can_access_permissions_view(user):
    return is_any_admin(user)