We're updating the issue view to help you get more done. 

BB-1471: Add site configuration flag to allow changing default redirection after login

Description

This PR adds a setting that enables customizing the default redirect behaviour from the login page. Currently, after login, the user is redirected to `/dashboard`.
If `dashboard` url doesn't exist, the platform breaks because the fallback url doesn't exist (`home`). This PR also fixes that.

*JIRA tickets*: TBD

*Sandbox URL*: TBD - sandbox is being provisioned.

*Merge deadline*: None.

*Testing instructions*:

1. Log in the LMS from this URL: http://edx.devstack.lms:18000/login (make sure there is no `?next=` parameter.
2. Check that the user is redirected to `/dashboard`.
3. Check out this PR, and asset that the default behaviour is the same.
4. Set `DEFAULT_REDIRECT_AFTER_LOGIN` to `courses`.
5. Check that when logging in, the user is redirected to `/courses`.
6. Set `DEFAULT_REDIRECT_AFTER_LOGIN` to an unexisting url (`t3st-inv4l1d-l1nk`).
7. Check that the user is redirected to `/dashboard` without any issues.

*Reviewers*

  • [ ] @xitij2000

  • [ ] edX reviewer[s] TBD

Status

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Giovanni Cimolin da Silva

Repo

edx/edx-platform

PR Number

21,333

Customer

Course

None

OSCM Assignee

None

Github Latest Action

issue_comment: created

Github Latest Action by edX

No

Github PR Last Updated At

Aug 15, 2019, 2:21 PM

Github PR Last Updated By

edx-status-bot

Impacted Users (OSPR)

None

Impacted Environments (OSPR)

None

Feature Control (OSPR)

None

Priority

Unset