Ejemplo n.º 1
0
def get_subscribers_backend(request: HttpRequest, user_profile: UserProfile,
                            stream_id: int=REQ('stream', converter=to_non_negative_int)) -> HttpResponse:
    (stream, recipient, sub) = access_stream_by_id(user_profile, stream_id,
                                                   allow_realm_admin=True)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 2
0
def get_subscribers_backend(request: HttpRequest, user_profile: UserProfile,
                            stream_id: int=REQ('stream', converter=to_non_negative_int)) -> HttpResponse:
    (stream, recipient, sub) = access_stream_by_id(user_profile, stream_id,
                                                   allow_realm_admin=True)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 3
0
def get_subscribers_backend(request, user_profile,
                            stream_id=REQ('stream', converter=to_non_negative_int)):
    # type: (HttpRequest, UserProfile, int) -> HttpResponse
    (stream, recipient, sub) = access_stream_by_id(user_profile, stream_id)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 4
0
def get_subscribers_backend(request, user_profile,
                            stream_id=REQ('stream', converter=to_non_negative_int)):
    # type: (HttpRequest, UserProfile, int) -> HttpResponse
    (stream, recipient, sub) = access_stream_by_id(user_profile, stream_id)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 5
0
def get_subscribers_backend(request, user_profile,
                            stream_id=REQ('stream', converter=to_non_negative_int)):
    # type: (HttpRequest, UserProfile, int) -> HttpResponse
    stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 6
0
def get_subscribers_backend(request, user_profile, stream_name=REQ('stream')):
    stream = get_stream(stream_name, user_profile.realm)
    if stream is None:
        raise JsonableError("Stream does not exist: %s" % (stream_name, ))

    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 7
0
def get_subscribers_backend(request, user_profile, stream_name=REQ('stream')):
    stream = get_stream(stream_name, user_profile.realm)
    if stream is None:
        raise JsonableError("Stream does not exist: %s" % (stream_name,))

    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 8
0
def get_subscribers_backend(request, user_profile, stream_name=REQ('stream')):
    # type: (HttpRequest, UserProfile, text_type) -> HttpResponse
    stream = get_stream(stream_name, user_profile.realm)
    if stream is None:
        raise JsonableError(_("Stream does not exist: %s") % (stream_name, ))

    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 9
0
def get_subscribers_backend(request, user_profile, stream_name=REQ('stream')):
    # type: (HttpRequest, UserProfile, text_type) -> HttpResponse
    stream = get_stream(stream_name, user_profile.realm)
    if stream is None:
        raise JsonableError(_("Stream does not exist: %s") % (stream_name,))

    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})
Ejemplo n.º 10
0
def get_subscribers_backend(request,
                            user_profile,
                            stream_id=REQ('stream',
                                          converter=to_non_negative_int)):
    # type: (HttpRequest, UserProfile, int) -> HttpResponse
    stream = get_and_validate_stream_by_id(stream_id, user_profile.realm)
    subscribers = get_subscriber_emails(stream, user_profile)

    return json_success({'subscribers': subscribers})