onboarding: add endpoint for updating your onboarding steps.

(imported from commit 30c326b50cd2273099aa464f2d9502f929a3d48f)
This commit is contained in:
Jessica McKellar
2013-05-08 09:28:27 -04:00
parent 24bb8ad797
commit c6da73ade9
2 changed files with 11 additions and 1 deletions

View File

@@ -29,7 +29,8 @@ from zephyr.lib.actions import do_add_subscription, do_remove_subscription, \
create_stream_if_needed, gather_subscriptions, subscribed_to_stream, \
update_user_presence, set_stream_color, get_stream_colors, update_message_flags, \
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, \
is_unique, is_inactive, isnt_mit
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)
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
# this a real superuser security check.
def is_super_user_api(request):