Rather than fetching the Site for every provider in a loop, just look at
the ID of the site.
Added regression test, showing N `django_site` requests before and 0 after.
Apply same username restrictions during SSO pipeline as we have user registeration flow to avoid SSO flow breakage at the time of user creation.
ENT-2730
Code quality fixes
* Fix all stylelint errors
For any errors that fixing would require changing the output of the css disable stylelint for that line instead of modifying.
* Update quality.py
Make stylelint quality check pass when there are no errors
* Delete empty selectors
In this case,
* unenroll the currently linked learner from the courses associated with related ProgramCourseEnrollments
* for each course the is enrolled in as part of a ProgramCourseEnrollment, if the coures has an audit track, then move the enrollment into the audit track. Otherwise, keep the learner's enrollment in the existing track.
* link the new user to the ProgramEnrollment
* enroll the new user in the Master's track in the courses associated with related ProgramCourseEnrollments
This performs a dark launch compare of the existing implementation
(still in use) for fetching TPA provider configs and a new
implementation, recording metrics on exceptions and mismatches.
The new implementation should have two benefits, once we're switched
over:
- Fix 1+N queries on login page view where the site for each config
was fetched in a loop (ARCHBOM-1139)
- Don't allow configs with the same key on different sites to
interfere with each other (regression test added)
The new impl does not use TieredCache, but only the request cache,
which we may want to adjust later.
Improve accuracy of javascript-escape linter: Previously this would
match on FOOescape() and FOO.escape calls, but neither are the global
escape function we are worried about.
The regex probably isn't 100% accurate; there may be still false
positives (javascript allows a large range of characters in identifiers,
some of which may not be covered by [\w.$]). The main thing is to avoid
false negatives here though - this will definitely catch any use of
`escape()` or `window.escape()`.
Also remove javascript-interpolate lint - this was deemed unecessary.
StringUtils.interpolate is not in fact safe (it does no html escaping),
so the results of this lint are misleading.
If the id of a `.formulaequationinput input` element contains a special
character, then the selector for $preview was silently failing to match
the element, because no escaping was happening.
This fixes the issue by escaping the id before passing to the jQuery
selector function. CSS.escape is the ideal method, but this isn't
present in IE or Edge, so we use a fallback borrowed from the new
jQuery.escapeSelector method.
Previously code was only showing banner for enterprise
learners. This patch would remove this restriction
and is available to all edX learners provided that
'enable_secondary_email_feature' is switched on.
PROD-1477
In the course outline, if a subsection has any graded content,
show a graded icon (the pencil icon).
Also, show the graded icon for LTI xmodule units (xblocks is a
different repo, but will get same treatment).
AA-75
This was added in here as a shim to catch places that were still using
the old version of these models that had an attribute called course_id
instead of the `course` foreign key. After monitoring production for
two weeks, we can be pretty confident that we've caught most places that
do this. Removing this code since it should no longer be needed.