Exemple #1
0
 def page_context(self):
     return {
         'settings': self.settings_context,
         'source': self.source,
         'sync_url': self.sync_urlname,
         'is_developer': IS_DEVELOPER.enabled(self.request.couch_user.username)
     }
Exemple #2
0
 def _inner(request, *args, **kwargs):
     user = request.user
     if IS_DEVELOPER.enabled(user.username) or user.is_superuser:
         return view_func(request, *args, **kwargs)
     else:
         return HttpResponseRedirect(reverse("no_permissions"))
Exemple #3
0
 def _permission_check(couch_user, domain):
     return (
         couch_user.is_superuser or
         IS_DEVELOPER.enabled(couch_user.username)
     )
Exemple #4
0
 def _permission_check(couch_user, domain):
     return (
         couch_user.is_superuser or
         IS_DEVELOPER.enabled(couch_user.username)
     )
Exemple #5
0
 def _inner(request, *args, **kwargs):
     user = request.user
     if IS_DEVELOPER.enabled(user.username) or user.is_superuser:
         return view_func(request, *args, **kwargs)
     else:
         return HttpResponseRedirect(reverse("no_permissions"))