(view_fn)
return locations_access_required(_inner)
Decorator controlling a user's access to a location types.
Decorator controlling a user's access to a location types.
Decorator controlling a user s access to a location types .
def can_edit_location_types(view_fn):
    """
    Decorator controlling a user's access to a location types.
    """
    @wraps(view_fn)
    def _inner(request, domain, *args, **kwargs):
        if user_can_edit_location_types(request.couch_user, request.domain):
            return view_fn(request, domain, *args, **kwargs)
        raise Http404()
    return locations_access_required(_inner)
def can_edit_location_types ( view_fn ) : @ wraps ( view_fn ) def _inner ( request , domain , * args , * * kwargs ) : if user_can_edit_location_types ( request . couch_user , request . domain ) : return view_fn ( request , domain , * args , * * kwargs ) raise Http404 ( ) return locations_access_required ( _inner )