def require_login(handler):
 def require_login_wrapper_fn(request, *args, **kwargs):
  if getattr(request, 'is_logged_in', False):
   return handler(request, *args, **kwargs)
  raise PermissionDenied(_('You must be logged in to access this page.'))
 return require_login_wrapper_fn

def require_login ( handler ) : def require_login_wrapper_fn ( request , * args , ** kwargs ) : if getattr ( request , 'is_logged_in' , False ) : return handler ( request , * args , ** kwargs ) raise PermissionDenied ( _ ( 'You must be logged in to access this page.' ) ) return require_login_wrapper_fn
make sure that a user is logged in to the distributed server .