Skip to content

Add API endpoint for issuing programs certificates - #11541

Merged
rlucioni merged 1 commit into
masterfrom
renzo/manual-cert-trigger
Feb 17, 2016
Merged

Add API endpoint for issuing programs certificates#11541
rlucioni merged 1 commit into
masterfrom
renzo/manual-cert-trigger

Conversation

@rlucioni

Copy link
Copy Markdown
Contributor

Allows staff users to manually enqueue the task responsible for awarding programs certificates. ECOM-3692.

@jimabramson please review.

@rlucioni
rlucioni force-pushed the renzo/manual-cert-trigger branch 4 times, most recently from 75be793 to 3633db6 Compare February 16, 2016 21:47
@rlucioni

Copy link
Copy Markdown
Contributor Author

@jimabramson I've moved the endpoint to the LMS support app.


from rest_framework import permissions, status, views
from rest_framework.response import Response
from rest_framework.authentication import SessionAuthentication

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: alphabetization

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got me! Fixed.

@jimabramson

Copy link
Copy Markdown

@rlucioni LGTM. Is CSRF protection happening by default (under session auth)? I don't see it as a high risk endpoint, but if we need to explicitly enable protection then I believe we should do that.

@rlucioni

Copy link
Copy Markdown
Contributor Author

@jimabramson DRF's SessionAuthentication enforces CSRF validation by default (reference).

Allows staff users to manually enqueue the task responsible for awarding programs certificates. ECOM-3692.
@rlucioni
rlucioni force-pushed the renzo/manual-cert-trigger branch from 3633db6 to 619420b Compare February 17, 2016 18:52
@jimabramson

Copy link
Copy Markdown

👍 once tests pass.

rlucioni pushed a commit that referenced this pull request Feb 17, 2016
Add API endpoint for issuing programs certificates
@rlucioni
rlucioni merged commit 62d07c9 into master Feb 17, 2016
@rlucioni
rlucioni deleted the renzo/manual-cert-trigger branch February 17, 2016 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants