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

[WIP] Optionally require logins for certificate views

Description

We'd like to optionally require logins for viewing and downloading certificates. This adds a waffle switch which when enabled uses the django `login_required`decorator on the certificate views.

This also adds the certificate status to the GeneratedCertificates admin page view.

*JIRA tickets*: Implements BB-1388.

*Dependencies*: None

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

*Testing instructions*:

1. Generate a certificate to test with.
```
/edx/bin/{python,manage}.edxapp lms --settings=devstack_docker generate_fake_cert verified course-v1:edX+DemoX+Demo_Course
```
2. Check the certificate renders normally with no login required in an logged-out browser: http://localhost:18000/certificates/user/8/course/course-v1:edX+DemoX+Demo_Course
3. Enable the waffle switch
```
/edx/bin/{python,manage}.edxapp lms --settings=devstack_docker waffle_switch certificates.require_login on
```
4. Check the certificate page again and ensure it requires login now.

*Author notes and concerns*:

1. Should we create a waffle configuration in a new file for the certificates application?

*Reviewers*

  • [ ] (@giovannicimolin )

  • [ ] edX reviewer[s] TBD

Status

Assignee

Marco Morales

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Josh McLaughlin

Repo

edx/edx-platform

PR Number

21,147

Customer

Course

None

OSCM Assignee

None

Github Latest Action

pull_request: review_requested

Github Latest Action by edX

Yes

Github PR Last Updated At

Jul 29, 2019, 8:45 PM

Github PR Last Updated By

natabene

Impacted Users (OSPR)

None

Impacted Environments (OSPR)

None

Feature Control (OSPR)

None

Priority

Unset