@webapi_decorator
def webapi_check_login_required(view_func):
 @webapi_response_errors(NOT_LOGGED_IN)
 def _check(*args, **kwargs):
  siteconfig = SiteConfiguration.objects.get_current()
  request = _find_httprequest(args)
  if (siteconfig.get(u'auth_require_sitewide_login') or (request.user.is_anonymous() and (u'HTTP_AUTHORIZATION' in request.META))):
   return webapi_login_required(view_func)(*args, **kwargs)
  else:
   return view_func(*args, **kwargs)
 _check.checks_login_required = True
 return _check

@ webapi_decorator def webapi_check_login_required ( view_func ) : @ webapi_response_errors ( NOT_LOGGED_IN ) def _check ( * args , ** kwargs ) : siteconfig = SiteConfiguration . objects . get_current ( ) request = _find_httprequest ( args ) if ( siteconfig . get ( u'auth_require_sitewide_login' ) or ( request . user . is_anonymous ( ) and ( u'HTTP_AUTHORIZATION' in request . META ) ) ) : return webapi_login_required ( view_func ) ( * args , ** kwargs ) else : return view_func ( * args , ** kwargs ) _check . checks_login_required = True return _check
a decorator that checks whether login is required on this installation and .