mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 05:58:25 +00:00
onboarding: add endpoint for updating your onboarding steps.
(imported from commit 30c326b50cd2273099aa464f2d9502f929a3d48f)
This commit is contained in:
@@ -102,6 +102,7 @@ urlpatterns += patterns('zephyr.views',
|
|||||||
url(r'^json/messages_in_narrow$', 'json_messages_in_narrow'),
|
url(r'^json/messages_in_narrow$', 'json_messages_in_narrow'),
|
||||||
url(r'^json/create_bot$', 'json_create_bot'),
|
url(r'^json/create_bot$', 'json_create_bot'),
|
||||||
url(r'^json/get_bots$', 'json_get_bots'),
|
url(r'^json/get_bots$', 'json_get_bots'),
|
||||||
|
url(r'^json/update_onboarding_steps$', 'json_update_onboarding_steps'),
|
||||||
|
|
||||||
# These are json format views used by the API. They require an API key.
|
# These are json format views used by the API. They require an API key.
|
||||||
url(r'^api/v1/get_profile$', 'api_get_profile'),
|
url(r'^api/v1/get_profile$', 'api_get_profile'),
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ from zephyr.lib.actions import do_add_subscription, do_remove_subscription, \
|
|||||||
create_stream_if_needed, gather_subscriptions, subscribed_to_stream, \
|
create_stream_if_needed, gather_subscriptions, subscribed_to_stream, \
|
||||||
update_user_presence, set_stream_color, get_stream_colors, update_message_flags, \
|
update_user_presence, set_stream_color, get_stream_colors, update_message_flags, \
|
||||||
recipient_for_emails, extract_recipients, do_events_register, do_finish_tutorial, \
|
recipient_for_emails, extract_recipients, do_events_register, do_finish_tutorial, \
|
||||||
get_status_dict, do_change_enable_offline_email_notifications
|
get_status_dict, do_change_enable_offline_email_notifications, \
|
||||||
|
do_update_onboarding_steps
|
||||||
from zephyr.forms import RegistrationForm, HomepageForm, ToSForm, CreateBotForm, \
|
from zephyr.forms import RegistrationForm, HomepageForm, ToSForm, CreateBotForm, \
|
||||||
is_unique, is_inactive, isnt_mit
|
is_unique, is_inactive, isnt_mit
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
@@ -902,6 +903,14 @@ def json_change_enter_sends(request, user_profile,
|
|||||||
do_change_enter_sends(user_profile, enter_sends)
|
do_change_enter_sends(user_profile, enter_sends)
|
||||||
return json_success()
|
return json_success()
|
||||||
|
|
||||||
|
@authenticated_json_post_view
|
||||||
|
@has_request_variables
|
||||||
|
def json_update_onboarding_steps(request, user_profile,
|
||||||
|
onboarding_steps=REQ(converter=json_to_list,
|
||||||
|
default=[])):
|
||||||
|
do_update_onboarding_steps(user_profile, onboarding_steps)
|
||||||
|
return json_success()
|
||||||
|
|
||||||
# Currently tabbott/extra@mit.edu is our only superuser. TODO: Make
|
# Currently tabbott/extra@mit.edu is our only superuser. TODO: Make
|
||||||
# this a real superuser security check.
|
# this a real superuser security check.
|
||||||
def is_super_user_api(request):
|
def is_super_user_api(request):
|
||||||
|
|||||||
Reference in New Issue
Block a user