Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

And/add detail view to result notification #200

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

andrey-canon
Copy link
Collaborator

Description

This add a new endpoint that allow to get the detail event

Testing instructions

  1. Make a get request to /eox-nelp/api/pearson_vue/v1/resultNotification/<course_id>

Result

image

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.

Checklist for Merge

  • Tested in a remote environment
  • Updated documentation
  • Rebased master/main
  • Squashed commits

@github-actions github-actions bot added test size/m m lines label labels Jul 15, 2024
@johanseto johanseto self-assigned this Jul 15, 2024
@andrey-canon andrey-canon changed the base branch from master to and/refactor_pearson_api July 15, 2024 23:23
@andrey-canon andrey-canon changed the base branch from and/refactor_pearson_api to master July 16, 2024 18:00
@andrey-canon andrey-canon force-pushed the and/add_detail_view_to_result_notification branch from 5cfa74a to aebfe51 Compare July 16, 2024 18:01
@github-actions github-actions bot added size/s and removed size/m m lines label labels Jul 16, 2024
Http404: If no objects match the given candidate and course.
"""
objects = self.get_queryset().filter(
candidate=self.request.user,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was testing this, and I would check the reason of the candidate using only the request.user. I mean this API is by Bearer so the the user would be the same as the third-party- application. So this would only allow to view courses of the application user.
Eg. my application or credentials of the Api are attached to cms user.
So after I create a resultNotification related cms_user I could get data of
image
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was testing this, and I would check the reason of the candidate using only the request.user. I mean this API is by Bearer so the the user would be the same as the third-party- application. So this would only allow to view courses of the application user. Eg. my application or credentials of the Api are attached to cms user. So after I create a resultNotification related cms_user I could get data of image image

you are right, that is the purpose of these changes

Copy link
Collaborator

Choose a reason for hiding this comment

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

But why is this useful? only to check the pearsonbearer application user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the bearer application user, the jwt application user and finally any user with a jwt token(which is not associated to a Django toolkit application )

@andrey-canon andrey-canon merged commit 6df7d50 into master Jul 16, 2024
6 of 7 checks passed
@andrey-canon andrey-canon deleted the and/add_detail_view_to_result_notification branch July 16, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants