{"action":"created","issue":{"url":"https://api.github.com/repos/edx/ecommerce/issues/1214","repository_url":"https://api.github.com/repos/edx/ecommerce","labels_url":"https://api.github.com/repos/edx/ecommerce/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/edx/ecommerce/issues/1214/comments","events_url":"https://api.github.com/repos/edx/ecommerce/issues/1214/events","html_url":"https://github.com/edx/ecommerce/pull/1214","id":215843898,"number":1214,"title":"[ENT-236] Check data sharing consent status more thoroughly for coupons","user":{"login":"haikuginger","id":7773758,"avatar_url":"https://avatars0.githubusercontent.com/u/7773758?v=3","gravatar_id":"","url":"https://api.github.com/users/haikuginger","html_url":"https://github.com/haikuginger","followers_url":"https://api.github.com/users/haikuginger/followers","following_url":"https://api.github.com/users/haikuginger/following{/other_user}","gists_url":"https://api.github.com/users/haikuginger/gists{/gist_id}","starred_url":"https://api.github.com/users/haikuginger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haikuginger/subscriptions","organizations_url":"https://api.github.com/users/haikuginger/orgs","repos_url":"https://api.github.com/users/haikuginger/repos","events_url":"https://api.github.com/users/haikuginger/events{/privacy}","received_events_url":"https://api.github.com/users/haikuginger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-21T18:55:54Z","updated_at":"2017-03-23T21:08:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/ecommerce/pulls/1214","html_url":"https://github.com/edx/ecommerce/pull/1214","diff_url":"https://github.com/edx/ecommerce/pull/1214.diff","patch_url":"https://github.com/edx/ecommerce/pull/1214.patch"},"body":"This pull request adds more thorough checks of user data sharing consent status when redeeming a coupon. At present, users are redirected to the consent flow as long as the attached enterprise has data sharing consent enabled, without regard to whether a user has already provided consent or not. This pull request ensures that users are only directed to the consent flow when they have not already provided consent (for a course or account) and the enterprise enforces consent either at the account level or at the course level.\r\n\r\n**JIRA tickets**: Implements [ENT-236](https://openedx.atlassian.net/browse/ENT-236)\r\n\r\n**Dependencies**: None\r\n\r\n**Merge deadline**: 27 March 2017\r\n\r\n**Testing instructions**:\r\n\r\n1. Requires a fully-configured course discovery and ecommerce stack.\r\n2. Add a coupon linked to an Enterprise Customer\r\n3. Ensure that the Enterprise Customer has data sharing consent enabled, enforced at enrollment.\r\n3. In the LMS, either log in with an SSO provider linked to the EnterpriseCustomer and provide consent, or manually create a UserDataSharingConsentAudit object via the shell, linked to the user and enterprise in question, with consent enabled.\r\n4. Download the coupon report for the coupon created earlier, and navigate to the \"Offers page\" URL in that report.\r\n5. Select the course you want to use from the coupon; note that you're taken all the way through the coupon flow and back to the dashboard without being interrupted, rather than being redirected to the consent page.\r\n6. Unlink your user from the Enterprise Customer; set the Enterprise Customer to have data sharing consent enabled, but \"optional\".\r\n7. De-enroll your user from the course.\r\n8. Again, browse to the Offers page and click through; again, observe that you're not stopped to provide consent."},"comment":{"url":"https://api.github.com/repos/edx/ecommerce/issues/comments/288860326","html_url":"https://github.com/edx/ecommerce/pull/1214#issuecomment-288860326","issue_url":"https://api.github.com/repos/edx/ecommerce/issues/1214","id":288860326,"user":{"login":"mattdrayer","id":4520595,"avatar_url":"https://avatars3.githubusercontent.com/u/4520595?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdrayer","html_url":"https://github.com/mattdrayer","followers_url":"https://api.github.com/users/mattdrayer/followers","following_url":"https://api.github.com/users/mattdrayer/following{/other_user}","gists_url":"https://api.github.com/users/mattdrayer/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdrayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdrayer/subscriptions","organizations_url":"https://api.github.com/users/mattdrayer/orgs","repos_url":"https://api.github.com/users/mattdrayer/repos","events_url":"https://api.github.com/users/mattdrayer/events{/privacy}","received_events_url":"https://api.github.com/users/mattdrayer/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T21:08:08Z","updated_at":"2017-03-23T21:08:08Z","body":"Let's tag-in @vkaracic @marjev since they've been so helpful with reviewing our ecommerce changes -- @mjfrey FYI as well."}}
{"actor":{"display_login":"mattdrayer"}}