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

David Ormsbee

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Giovanni Cimolin da Silva

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Priority

Unset
Configure