Add toggle to redirect user to the login page on unauthenticated enrollement

Description

  1.  

    1. Description
      Adds toggle REDIRECT_UNAUTHENTICATED_USER_TO_LOGIN_ON_ENROLL for enrollment behaviour for unauthenticated user. If true, the user will be redirected to 'signin_user' route with `next` query parameter set to current page.

  1.  

    1. Testing instructions

1. Get the master devstack running and checkout to this branch.
2. Attach to lms shell using make lms-shell.
3. Edit `/edx/etc/lms.yml` and add `REDIRECT_UNAUTHENTICATED_USER_TO_LOGIN_ON_ENROLL: true`
4. Restart lms using `make lms-restart`
5. Visit about page for Demo course on LMS
6. Make sure you are unauthenticated.
7. Click 'Enroll Now' button
8. Verify that the page redirects to login page.
9. Login with audit user.
10. Verify that the user is redirected to Demo course about page.

  1.  

    1. Deadline

"None"

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Wajeeha Khalid

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Arjun Singh Yadav

Repo

edx/edx-platform

Customer

Github Lines Added

17

Github Lines Deleted

3