Commit Graph

4329 Commits

Author SHA1 Message Date
stvn
b033b0d13d docs: Update references to Django MIDDLEWARE_CLASSES
As code was already updated (~1 year ago) in #23070.
A first attempt was made in #18342, which can now be closed.

References: https://github.com/edx/edx-platform/pull/23070
References: https://github.com/edx/edx-platform/pull/18342
2021-02-25 20:00:09 -08:00
stvn
8314971e0b refactor: Convert discussions to pluggable app
This minimizes our footprint outside of the djangoapp, now and moving
forward. Not only can we drop the `lms/envs/common.py` change, but we
can also avoid touching `lms/urls.py` when we add the API. Everything
can stay contained within `openedx/core/djangoapps/discussions`.
2021-02-25 18:51:25 -08:00
Justin Hynes
d6fa4de4b2 Merge pull request #26632 from edx/jhynes/log_exception_awarding_prog_certs
Log error when failing to award program certificate
2021-02-25 11:52:10 -05:00
Justin Hynes
03d788fc5b Log error when failing to award program certificate 2021-02-25 10:25:49 -05:00
Zachary Hancock
1af3b5a68c runtime service exposing learning_sequences api to proctoring (#26692) 2021-02-24 17:25:49 -05:00
Adeel Khan
d9ec42c425 Add throttling to validate token and reset password end points
VAN-312
2021-02-24 06:47:18 +05:00
Michael Terry
23f34031d1 Merge pull request #26663 from edx/mikix/enable-schedules
feat: turn on schedule creation by default
2021-02-23 14:34:11 -05:00
Michael Terry
74887aa216 feat: turn on schedule creation by default
This commit removes several waffle toggles that have been enabled
on edx.org for years. It's time to remove the rollout gating for
these features and enable them by default.

This doesn't directly change any behavior. But it does create new
database objects by default now and allows for enabling other
schedule based features more easily.

Specifically, the following toggles were affected.

schedules.create_schedules_for_course
- Waffle flag removed as always-enabled
- We now always create a schedule when an enrollment is created

schedules.send_updates_for_course
- Waffle flag removed as always-enabled
- Course update emails are sent as long as the ScheduleConfig
  allows it.
- This is not a change in default behavior, because ScheduleConfig
  is off by default.

dynamic_pacing.studio_course_update
- Waffle switch removed as always-enabled
- Course teams can now always edit course updates directly in Studio

ScheduleConfig.create_schedules
ScheduleConfig.hold_back_ratio
- Model fields for rolling out the schedules feature
- Schedules are now always created
- This commit only removes references to these fields, they still
  exist in the database. A future commit will remove them entirely

This commit also adds a new has_highlights field to CourseOverview.
This is used to cache whether a course has highlights, used to
decide which course update email behavior they get. Previously every
enrollment had to dig into the modulestore to determine that.
2021-02-23 12:34:02 -05:00
Robert Raposa
40611bb915 ARCHBOM-1667: fix: remove authentication from auth exchange (#26618)
* Remove authentication, including SessionAuthentication, to fix CSRF
  exemption by dropping CSRF check of SessionAuthentication.
* Several changes to make it more clear that only POST is supported and
  clean up GET method testing.
* Removed the temporary 403 error logging that wasn't working.
* Removed test_single_access_token which was written for DOP, but
  doesn't work with DOT. See
  [MA-2122](https://openedx.atlassian.net/browse/MA-2122) for a ticket
  about implementing this for DOT, although it doesn't seem to be a
  priority. NOTE: A comment was added to the ticket explaining that this
  test was removed.
* GET now returns default error for methods not allowed.

ARCHBOM-1667
2021-02-23 10:57:11 -05:00
M. Zulqarnain
42fc6aef03 Upgrade django-ipware (#24827) 2021-02-23 18:14:17 +05:00
Matthew Piatetsky
789af8d4ac Merge pull request #26409 from edx/AA-304
[AA-304] Create backend for three day streak celebration
2021-02-22 11:19:39 -05:00
Matt Tuchfarber
5345466e31 Merge pull request #26622 from edx/tuchfarber/remove_pii_from_mgmt_cmd_cfg
Update mgmt cmds to use user_ids instead of PII
2021-02-22 11:04:49 -05:00
Matthew Piatetsky
3b45a72b8e Create backend for three day streak celebration
This feature uses the first_day_of_streak, last_day_of_streak and last_streak_celebration fields to determine whether the user should see a celebration.
AA-304
2021-02-22 10:50:33 -05:00
Matt Tuchfarber
55d9e18495 Update mgmt cmds to use user_ids instead of PII 2021-02-22 10:30:35 -05:00
Aarif
813064ad49 replaced unittest assertions pytest assertions (#26574) 2021-02-22 20:04:51 +05:00
Aarif
c21ac0c3df replaced unittest assertions pytest assertions (#26573) 2021-02-22 20:04:27 +05:00
Aarif
cbf78fbdf3 replaced unittest assertions pytest assertions (#26572) 2021-02-22 20:04:00 +05:00
Aarif
4ef7d63211 replaced unittest assertions pytest assertions (#26571) 2021-02-22 20:03:33 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
Aarif
95d6397f41 replaced unittest assertions pytest assertions (#26570) 2021-02-22 12:25:27 +05:00
Aarif
98f5a886ba replaced unittest assertions pytest assertions (#26569) 2021-02-22 12:24:59 +05:00
Aarif
cfcb9330b3 replaced unittest assertions pytest assertions (#26568) 2021-02-22 12:24:33 +05:00
Aarif
c880a44947 replaced unittest assertions pytest assertions (#26566) 2021-02-22 12:24:07 +05:00
Aarif
ba16e05899 replaced unittest assertions pytest assertions (#26564) 2021-02-19 16:04:32 +05:00
Aarif
774caac305 replaced unittest assertions pytest assertions (#26513) 2021-02-18 18:07:46 +05:00
Aarif
d2644e2dc2 replaced unittest assertions pytest assertions (#26554) 2021-02-18 18:06:13 +05:00
Zainab Amir
c260f72c2e VAN-311: Add multiple enterprise support for Authn MFE (#26526) 2021-02-18 17:24:44 +05:00
David Ormsbee
843668a011 Revert "feat: 403 logging for exchange_access_token (#26511)" (#26608)
This reverts commit 0517603b6d.

This was masking a LabXchange error by blowing up with:
"Stack trace builtins:AttributeError: 'NoneType' object has no attribute 'status_code'"
2021-02-17 17:08:44 -05:00
Feanil Patel
7840c1f248 Merge pull request #26487 from edx/feanil/remove_django_ratelimit_backend
refactor Replace django-ratelimit-backend with django-ratelimit
2021-02-16 11:16:13 -05:00
Awais Qureshi
d7dc8de053 BOM-1437
Fixing tests which were failing on running alone.
Main root cause was the mongodb client connection error.
On running all tests this mongodb connection establishes by some other test.
2021-02-16 10:35:59 +05:00
Robert Raposa
0517603b6d feat: 403 logging for exchange_access_token (#26511)
The mobile app is getting unexpected 403s from
/oauth2/exchange_access_token/, but we have been unable
to pinpoint from where they are coming. This commit
introduces a temporary exception handler to provide stack info
for 403s on this endpoint to try to track down the source.

Requires the ENABLE_403_MONITORING setting to be set to
True to enable the logging.

ARCHBOM-1667
2021-02-12 15:34:55 -05:00
Matt Tuchfarber
63a144dda7 fix: Correct logging message to match function
The logging text was duplicated from a different function
2021-02-12 13:20:52 -05:00
Braden MacDonald
50dd1e8eca Merge pull request #26416 from BbrSofiane/bbrsofiane/tsd-schedules_enable_debugging
[TSD] Annotate schedules debugging toggle
2021-02-12 09:15:54 -08:00
Olivia Ruiz-Knott
5c95258115 Merge pull request #26461 from edx/ork/MICROBA-989_notify-credentials-takes-usernames
feat: allow notify_credentials to take a list of usernames
2021-02-12 10:45:15 -05:00
Manjinder Singh
a5e3675ce2 docs: annotate comprehensive theming settings 2021-02-12 15:05:55 +00:00
Feanil Patel
6fb93463a8 refactor Replace django-ratelimit-backend with django-ratelimit
We use django-ratelimit to limit per IP login attempts, and then we use
django-ratelimit-backend to limit per username login attempts. This
change replaces the usage of django-ratelimit-backend with another
instance of django-ratelimit so that both limits can be managed by one
library.

This is the first step in being able to fully excise
django-ratelimit-backend from edx-platform. Note that we're still using
the `RateLimitMixin` in openedx/core/djangoapps/oauth_dispatch/dot_overrides/backends.py
because studio and the admin UI still relies on that for rate limiting.
Those login paths will have to be updated before we can remove the mixin
from our auth backend.
2021-02-12 09:52:13 -05:00
Sofiane Bebert
a006bdde17 add annotation for DEBUG_MESSAGE_WAFFLE_FLAG 2021-02-12 12:22:19 +00:00
stvn
0aa75a4b2b Merge PR #26335 bd03/type-hints
* Commits:
  style: Add more type-hints to discussions app
2021-02-11 11:00:38 -08:00
Aarif
01ac3c2ed3 replaced unittest assertions pytest assertions (#26308) 2021-02-11 17:41:41 +05:00
Aarif
2ea9ea916a replaced unittest assertions pytest assertions (#26287) 2021-02-11 17:40:23 +05:00
Feanil Patel
14e11cad3d Merge pull request #26460 from edx/feanil/always_squelch
feat: Update the user_authn app to not log PII by default.
2021-02-10 13:58:04 -05:00
stvn
b17bbc8d66 style: Add more type-hints to discussions app 2021-02-10 08:42:05 -08:00
oliviaruizknott
52814f7378 test: add test to notify_credentials for multiple usernames 2021-02-10 11:25:23 -05:00
stvn
ef77ddc18d Merge PR #26345 bd03/admin/enabled
* Commits:
  fix: Add DiscussionsConfiguration.enabled to admin page
2021-02-10 08:25:16 -08:00
stvn
d8d4b4a0cc Merge PR #26346 bd03/models/str
* Commits:
  style: Cleanup DiscussionsConfiguration.__str__
2021-02-10 08:23:49 -08:00
Feanil Patel
62c0aa4917 feat: Update the user_authn app to not log PII by default.
Instead of optionally not logging usernames and emails, do so by
default.  This mostly removes some complexity from the app and is makes
it so that it's more secure by default.

I considered the question of allowing people to log usernames and
e-mails if they wanted to but opted not to for a couple of reasons:

* It would involve adding a new feature flag that would be the opposite
of the SQUELCH_PII_IN_LOGS which would be a bit confusing.  When do you
use which one? or do you need both? etc.
* There is still a way to correlate the messages to eachother and in
most cases also to a specific user(email being the exception).
2021-02-10 10:14:58 -05:00
Waheed Ahmed
5c9c6176b6 Add skip_authn_mfe query param option.
Added to serve old login/register pages for the e2e tests
until new tests added or old ones are fixed for the Authn MFE.
2021-02-10 19:17:46 +05:00
edX requirements bot
a2635e9821 Python Requirements Update (#26463)
* Updating Python Requirements

* change namespaced_switch_name to name

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-10 16:25:34 +05:00
oliviaruizknott
0533ecc814 feat: allow notify_credentials to take a list of usernames 2021-02-09 17:04:21 -05:00
Adeel Ehsan
59bc5072cd Merge pull request #26459 from edx/aehsan/van-351/field_added_in_validate_decisions_for_authn
field added in validate decisions for authn
2021-02-10 01:14:21 +05:00