-
Notifications
You must be signed in to change notification settings - Fork 10
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
Vouchers for user promotion - Part 1: Introduction of Vouchers #670
Conversation
During the merge, I noticed that the version specifier for "selenium-webdriver" was incorrectly placed inside the comment, so I fixed that (not yet `bundle install` executed, will do in next commit)
(see also the merge comment before this commit)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #670 +/- ##
==========================================
+ Coverage 53.86% 54.40% +0.54%
==========================================
Files 157 160 +3
Lines 6645 6744 +99
==========================================
+ Hits 3579 3669 +90
- Misses 3066 3075 +9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now! I've added some more cypress tests to also test the expiration of vouchers there (via newly introduced time travelling).
Please make sure to review everything I added to this PR by means of my last commits before finally squashing and merging into the dev
branch.
After the "squash and merge", I will take care of merge conflicts in the second part of the pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only thing left to do now is resolve the one conversation and merge dev into this branch where I fixed the flaky unit test, then rerun the tests and squash and merge
In this PR, we change the way in which users can become tutors, editors or teachers. Until now, they can be selected from a dropdown. With the change implemented in this PR, vouchers are issued, which can then be communicated externally (e.g. in persona or mail) to the people who are supposed to get the promotion in user status, and they can then in turn redeem these vouchers in their user profile to get the desired position (see part 2 of this PR: #671). The philosophy behind this is to further reduce the amount data that can be seen by users in elevated positions.
This should fit in nicely into the existing workflow where mails are sent to tutors anyways for information exchange. Adding the voucher code there is not too much of an effort. Note that tutors could of course go ahead and share the voucher with other people, we cannot control that. But if somebody really does that, the teacher will notice and can intervene.
Because of its size, this feature is split into two PRs. This is the first one which deals with the creation and destruction of vouchers. The second one deals with the actual redemption part, see #671.
Out of scope
This PR also
document.execCommand()
calls #684ToDo
Notes for reviewers
vouchers_controller_spec.rb
), but since this is security relevant, it would be good to check this in detail.Preview