Commit Graph

419 Commits

Author SHA1 Message Date
Jawayria
42e7576500 refactor: Removed unused imports
Removed unused imports from lms/envs
2021-04-02 18:30:19 +05:00
Zainab Amir
8cc5f13daf Add rate limit to registration endpoint (#27060)
Currently the registration endpoint has no rate limit. Added a new ratelimit
variable to support the change, it's value is set to 60/7d.

VAN-302
2021-03-25 16:28:30 +05:00
M. Zulqarnain
40a987d9d0 refactor: pyupgrade on LMS (#26851) 2021-03-22 17:51:23 +05:00
Kyle McCormick
bcb48525ac refactor: clean up unused ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS (#26900)
The setting overrides should've been cleaned up in a previous
commit, but I missed them. This change is a no-op.
2021-03-08 15:01:12 -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
Christie Rice
f844681913 Revert "BOM-2368: pyupgrade in LMS Directory (#26649)"
This reverts commit fc06846cb0.
2021-02-23 15:29:49 -05:00
M. Zulqarnain
fc06846cb0 BOM-2368: pyupgrade in LMS Directory (#26649)
* pyupgrade in lms dir

* replace wildcard

* pep8 fix

* fix quality
2021-02-23 12:36:00 +05: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
Bianca Severino
54505b82c4 Merge pull request #26436 from edx/bseverino/proctoring-check-fix
[MST-645] Account for no enrollment in courseware rules
2021-02-08 13:39:40 -05:00
Bianca Severino
4fb36709a5 Account for no enrollment in courseware rules 2021-02-08 13:12:52 -05:00
Tim McCormack
38f29c30f8 feat: Use edx-proctoring 3.0.0 and set required ID generation key (#26408)
MST-637: edx-proctoring 3.0.0 now requires a new key for use in ID
generation, starting from same value as SECRET_KEY (pre-rotation, but
rotation never happened for devstack.)

Remote config changes already made for relevant environments.
2021-02-05 16:19:14 +00:00
M. Zulqarnain
d9b9f21e22 pylint amnesty in LMS root (#26276) 2021-02-02 12:52:24 +05:00
Bianca Severino
42e1ac0888 Merge pull request #26182 from edx/bseverino/proctoring-requirements-email
[MST-515] Automated proctoring requirements email
2021-02-01 10:19:56 -05:00
Bianca Severino
902ab02357 Send proctoring requirements email when enrolled in relevant course mode 2021-02-01 09:44:30 -05:00
adeelehsan
55d2a4f897 Logistration MFE renamed to authn
VAN-300
2021-01-29 11:37:54 +05:00
Kyle McCormick
44d5060c60 Add setting for error'ing on deprecated imports
Deprecated edx-platform import paths
(for example, `student` instead of
`common.djangoapps.student`) currently raise
warnings when used. We want to fully remove
support for those paths.

As an easily reversible way to initially remove
support, we add a new setting to LMS and Studio
called `ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS`,
defaulting to False. We set it to True for devstack
and will set it to True in Stage and Production
soon. If critical errors occur, we can easily
flip the setting back to False.
2021-01-21 10:49:47 -05:00
Ned Batchelder
761306114d New LOGIN_ISSUE_SUPPORT_LINK setting
The login page had a hard-coded support.edx.org URL.  This changes it to
a configurable setting. BTR-32.
2020-12-04 14:55:27 -05:00
Kyle McCormick
4dda73d797 [BD-14] Migrate all environments to use database-backed organizations (#25153)
* Install `organizations` app into LMS and Studio non-optionally.
* Add toggle `ORGANIZATIONS_AUTOCREATE` to Studio.
* Remove the `FEATURES["ORGANIZATIONS_APP"]` toggle.
* Use the new `organizations.api.ensure_organization` function to
  either validate or get-or-create organizations, depending
  on the value of `ORGANIZATIONS_AUTOCREATE`,
  when creating course runs and V2 content libraries.
  We'll soon use it for V1 content libraries as well.
* Remove the `util.organizations_helpers` wrapper layer
  that had to exist because `organizations` was an optional app.
* Add `.get_library_keys()` method to the Split modulestore.
* Add Studio management command for backfilling organizations tables
  (`backfill_orgs_and_org_courses`).

For full details, see
https://github.com/edx/edx-organizations/blob/master/docs/decisions/0001-phase-in-db-backed-organizations-to-all.rst

TNL-7646
2020-12-02 13:58:40 -05:00
Simon Chen
00ad36839d MST-542 Roll out Accounts MFE IDV workflow (#25613)
* MST-542 remove the IDV redirect to Account MFE waffle flag to permanently redirect learners to new IDV workflow. This completes the rollout process on edx-platform
2020-12-01 09:08:12 -05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Zainab Amir
97e9fee92e Add third party auth context api (#25497) 2020-11-05 19:26:29 +05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Adeel Khan
d61936fdb6 Adds Logistration MFE url for forgot password email.
This patch would enable routing learner to logistration MFE
via forgot password url than on platform when
ENABLE_LOGISTRATION_MICROFRONTEND feature flag is set.

VAN-98
2020-10-29 16:25:20 +05:00
Zainab Amir
49ea5f5188 Update logistration MFE feature flag (#25356)
update logistration MFE feature flag to not be used in conjunction
with Accounts MFE toggle.

VAN-11
2020-10-23 12:11:56 +05:00
Jeremy Bowman
d19368525b DEPR-43 Remove most of the shoppingcart app (#24692)
Removed most of the deprecated shoppingcart app, leaving just enough to allow us to cleanly remove the related database tables later. Also removed the relevant Django settings that weren't in use elsewhere.
2020-10-14 14:24:52 -04:00
Calen Pennington
9c4f746d8f Get rid of unused NoOpMigrationModules 2020-09-23 10:05:37 -04:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Soban Javed
b7ca6d5619 Upgrade celery to 4.4.7
Replace django-celery with django-celery-results
Upgrade redis to latest
2020-09-22 16:20:45 +05:00
Sid Verma
735bc412d4 Add elasticsearch tests 2020-09-18 10:25:59 -04:00
uzairr
7bc17c7dd9 Ratelimit the registration endpoint
PROD-880
2020-08-20 18:38:26 +05:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Nizar Mahmoud
c0b6260c3e Adds Custom Extra Fields to Course Blocks API through LMS Settings 2020-08-06 21:27:31 +03:00
Jeff Chaves
e1bd970b46 ENT-2894: Use new welcome template when redirected from enterprise proxy login view (#24587)
* using new welcome template when redirected from enterprise proxy login view

* enabling safe redirects to enterprise learner portal from login in devstack

* ading admin portal to login redirect whitelist

* running make upgrade to version bump edx-enterprise
2020-07-24 17:40:42 -04:00
Saleem Latif
85bf89db3e Added COURSE_CATALOG_URL_ROOT to django settings 2020-06-30 14:19:54 +05:00
Waheed Ahmed
6b268c37b4 Rate limit logistration endpoints.
PROD-1506
2020-06-10 13:33:26 +05:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Robert Raposa
5de9eed420 ARCHBOM-1093: Fix unit test enable-migrations (#23789)
* fix old migrations
* fix a test
* fix enable-migrations cmd argument
* enhance verbose logging to log migrations
* update testing doc with help
2020-04-23 14:04:29 -04:00
M Zulqarnain
093bc8d2f3 Remove port range for liveserver test (#23672) 2020-04-10 00:59:34 +05:00
zia.fazal@arbisoft.com
cd60f6c973 Map first name to edx username by default oauth SSO
Change to map first name to edx username by default oauth SSO with `identityserver3` backend
ENT-2709

Addressed reviewer's feedback
2020-04-08 19:26:24 +05:00
Manjinder Singh
8592109a2a Removed OPENID settings (#23299)
Part of removal of OpenID Connect
2020-03-04 14:52:00 -05:00
Manjinder Singh
7d2ff9cd3f Removing all settings that have OIDC in name (#23251)
* Removing all settings that have OIDC in name

* Removing ENABLE_DOP_ADAPTER

* changes JWT_ISSUER value in devstack
2020-03-04 09:06:29 -05:00
David Joy
fe1942561a Redirect to the courseware MFE when the ‘courseware’ view is loaded 2020-02-21 11:44:38 -05:00
Diana Huang
2f019c4d23 Rename profile image hash seed to better describe what it is. 2020-02-19 13:11:45 -05:00
Aarif
8cc86d3aab BOM-1141
Updating the django-rate-limit requirement.
updated the django-ratelimit to use unreleased version that supports Django 2.2
2020-01-26 12:45:37 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Braden MacDonald
f31dc19887 Support anonymous users in the Blockstore-based XBlock runtime
Implementation details:
* Anonymous users are assigned a unique ID (like 
  `anon42c08f9996194e2a9339`) which gets stored in the django session.
  `block.scope_ids.user_id` and `block.runtime.anonymous_student_id`
  will both return this value.
* User state for anonymous users is stored in the django cache and
  automatically expires as the cache gets pruned. Because user state is
  stored, anonymous users can use interactive blocks like capa problems.
* There is no mechanism for upgrading to a registered account and
  keeping user state since the user state store for anonymous users
  (EphemeralKeyValueStore) is completely different than the one for
  registered users (DjangoKeyValueStore/"CSM"), and has no "list all
  keys" functionality.
* "User State Summary" field values are shared among [recently active]
  anonymous users but are not shared with registered users.
* Anonymous users can only access the `public_view` of XBlocks, not the
  regular `student_view`.
2019-12-19 16:12:24 -08:00
Calen Pennington
c83d0e2ca8 OverwriteStorage was removed from django-storages, so pull it into edx-platform (for now?) 2019-12-19 14:06:30 -05:00
Robert Raposa
2202545aec remove studio signin and signup pages
This completes the work started in https://github.com/edx/edx-platform/pull/19453
to use the LMS login and registration for Studio, rather than Studio
providing its own implementation.

LMS login/registration are being used for the following reasons:
1. LMS logistration properly handles all SSO integrations.
2. A single logistration is simpler to maintain and understand.
3. Allows Studio to work more like all other IDAs that use LMS
logistration.

The original switch to use LMS logistration for Studio also added the
toggle `DISABLE_STUDIO_SSO_OVER_LMS` to provide the community some
additional time for switching. This commit removes this toggle, which
at this point means all deployments will use the LMS logistration.

This change requires sharing cookies across LMS and Studio. Should that
prove to be a problem for certain Open edX instances, there are
discussions of possible alternative solutions.
See https://github.com/edx/edx-platform/pull/19845#issuecomment-559154256

Detailed changes:
* Fix some Studio links that still went to old Studio signin and signup.
* Remove DISABLE_STUDIO_SSO_OVER_LMS feature toggle.
* Remove old studio signin and signup pages and templates.
* Fix url name "login", which had different meanings for Studio and LMS.
* Use the following settings: LOGIN_URL, FRONTEND_LOGIN_URL,
FRONTEND_LOGOUT_URL, and FRONTEND_REGISTER_URL.
* Redirect /signin and /signup to the LMS logistration.
* Add custom metric `uses_pattern_library`.
* Add custom metric `student_activate_account`.
* Add Django Settings to allow /signin, /signup, and /login_post to be
disabled once ready.

This work also relates to ARCH-218 and DEPR-6.

ARCH-1253
2019-12-04 02:36:36 -05:00
Nimisha Asthagiri
db42c7e1e2 User Authn: Remove deprecated, ENABLE_COMBINED_LOGIN_REGISTRATION 2019-10-29 08:57:58 -04:00
Cory Lee
0befab339b Always run CSMH migrations in all contexts (#21776)
* Always run CSMHE migrations for every application in all contexts
2019-09-25 13:27:26 -04:00