fix: fix github url strings (org edx -> openedx)
This commit is contained in:
@@ -20,7 +20,7 @@ def cursor_paginate_serializer(inner_serializer_class):
|
||||
Create a cursor-paginated version of a serializer.
|
||||
|
||||
This is hacky workaround for an edx-api-doc-tools issue described here:
|
||||
https://github.com/edx/api-doc-tools/issues/32
|
||||
https://github.com/openedx/api-doc-tools/issues/32
|
||||
|
||||
It assumes we are using cursor-style pagination and assumes a specific
|
||||
schema for the pages. It should be removed once we address the underlying issue.
|
||||
|
||||
@@ -174,7 +174,7 @@ class AccessTokenExchangeForm(forms.Form):
|
||||
raise OAuthValidationError(
|
||||
{
|
||||
# invalid_client isn't really the right code, but this mirrors
|
||||
# https://github.com/edx/django-oauth2-provider/blob/edx/provider/oauth2/forms.py#L331
|
||||
# https://github.com/openedx/django-oauth2-provider/blob/edx/provider/oauth2/forms.py#L331
|
||||
"error": "invalid_client",
|
||||
"error_description": f"{client_id} is not a public client",
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class ImageFactory(ImageFactoryBase):
|
||||
"""
|
||||
For constructing dicts mirroring the catalog's serialized representation of ImageFields.
|
||||
|
||||
See https://github.com/edx/course-discovery/blob/master/course_discovery/apps/api/fields.py.
|
||||
See https://github.com/openedx/course-discovery/blob/master/course_discovery/apps/api/fields.py.
|
||||
"""
|
||||
description = factory.Faker('sentence')
|
||||
src = factory.Faker('image_url')
|
||||
@@ -112,7 +112,7 @@ class StdImageFactory(ImageFactoryBase):
|
||||
"""
|
||||
For constructing dicts mirroring the catalog's serialized representation of StdImageFields.
|
||||
|
||||
See https://github.com/edx/course-discovery/blob/master/course_discovery/apps/api/fields.py.
|
||||
See https://github.com/openedx/course-discovery/blob/master/course_discovery/apps/api/fields.py.
|
||||
"""
|
||||
url = factory.Faker('image_url')
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ from .models import BlockStructureConfiguration
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14358,
|
||||
# https://github.com/edx/edx-platform/pull/14571,
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14358,
|
||||
# https://github.com/openedx/edx-platform/pull/14571,
|
||||
# https://openedx.atlassian.net/browse/DEPR-144
|
||||
INVALIDATE_CACHE_ON_PUBLISH = WaffleSwitch(
|
||||
"block_structure.invalidate_cache_on_publish", __name__
|
||||
@@ -41,8 +41,8 @@ INVALIDATE_CACHE_ON_PUBLISH = WaffleSwitch(
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512,
|
||||
# https://github.com/edx/edx-platform/pull/14770,
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14512,
|
||||
# https://github.com/openedx/edx-platform/pull/14770,
|
||||
# https://openedx.atlassian.net/browse/DEPR-145
|
||||
STORAGE_BACKING_FOR_CACHE = WaffleSwitch(
|
||||
"block_structure.storage_backing_for_cache", __name__
|
||||
@@ -59,8 +59,8 @@ STORAGE_BACKING_FOR_CACHE = WaffleSwitch(
|
||||
# .. toggle_use_cases: temporary
|
||||
# .. toggle_creation_date: 2017-02-23
|
||||
# .. toggle_target_removal_date: 2017-05-23
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/14512,
|
||||
# https://github.com/edx/edx-platform/pull/14770,
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14512,
|
||||
# https://github.com/openedx/edx-platform/pull/14770,
|
||||
# https://openedx.atlassian.net/browse/DEPR-143
|
||||
RAISE_ERROR_WHEN_NOT_FOUND = WaffleSwitch(
|
||||
"block_structure.raise_error_when_not_found", __name__
|
||||
|
||||
@@ -40,7 +40,7 @@ def _directory_name(data_usage_key):
|
||||
# .. setting_default: ''
|
||||
# .. setting_description: Specifies the path in storage where block structures would be saved,
|
||||
# for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# For more information, check https://github.com/openedx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and on
|
||||
# `block_structure.storage_backing_for_cache`.
|
||||
directory_prefix = settings.BLOCK_STRUCTURES_SETTINGS.get('DIRECTORY_PREFIX', '')
|
||||
@@ -73,7 +73,7 @@ def _bs_model_storage():
|
||||
# .. setting_name: BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']
|
||||
# .. setting_default: None
|
||||
# .. setting_description: Specifies the storage used for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# For more information, check https://github.com/openedx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `block_structure.storage_backing_for_cache`.
|
||||
storage_class = settings.BLOCK_STRUCTURES_SETTINGS.get('STORAGE_CLASS')
|
||||
|
||||
@@ -81,7 +81,7 @@ def _bs_model_storage():
|
||||
# .. setting_default: {}
|
||||
# .. setting_description: Specifies the keyword arguments needed to setup the storage, which
|
||||
# would be used for storage-backed block structure cache.
|
||||
# For more information, check https://github.com/edx/edx-platform/pull/14571.
|
||||
# For more information, check https://github.com/openedx/edx-platform/pull/14571.
|
||||
# .. setting_warnings: Depends on `BLOCK_STRUCTURES_SETTINGS['STORAGE_CLASS']` and on
|
||||
# `block_structure.storage_backing_for_cache`.
|
||||
storage_kwargs = settings.BLOCK_STRUCTURES_SETTINGS.get('STORAGE_KWARGS', {})
|
||||
|
||||
@@ -7,7 +7,7 @@ the behavior should be modified, so it has been decided to consider any
|
||||
necessary fixes in a new ticket.
|
||||
|
||||
Please see the PR and discussion linked below for further context
|
||||
https://github.com/edx/edx-platform/pull/24545#discussion_r501738511
|
||||
https://github.com/openedx/edx-platform/pull/24545#discussion_r501738511
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
@@ -156,7 +156,7 @@ class CourseOutlineView(APIView):
|
||||
The CourseOutline, customized for a given user.
|
||||
|
||||
TODO: Swagger docs of API. For an exemplar to imitate, see:
|
||||
https://github.com/edx/edx-platform/blob/master/lms/djangoapps/program_enrollments/rest_api/v1/views.py#L792-L820
|
||||
https://github.com/openedx/edx-platform/blob/master/lms/djangoapps/program_enrollments/rest_api/v1/views.py#L792-L820
|
||||
"""
|
||||
# Translate input params and do course key validation (will cause HTTP
|
||||
# 400 error if an invalid CourseKey was entered, instead of 404).
|
||||
|
||||
@@ -26,10 +26,10 @@ The rest of the functionality would be similar to how the current LTI 1.1 provid
|
||||
.. _LTI NRPS: https://www.imsglobal.org/spec/lti-nrps/v2p0
|
||||
.. _pylti1.3: https://github.com/dmitry-viskov/pylti1.3
|
||||
.. _@dmitry-viskov: https://github.com/dmitry-viskov
|
||||
.. _earlier PR: https://github.com/edx/edx-platform/pull/21435
|
||||
.. _earlier PR: https://github.com/openedx/edx-platform/pull/21435
|
||||
.. _PyPi package: https://pypi.org/project/PyLTI1p3/
|
||||
.. _my-learning-analytics: https://github.com/tl-its-umich-edu/my-learning-analytics
|
||||
.. _NimbleWise (source): https://github.com/edx/edx-platform/pull/21435#issuecomment-664674601
|
||||
.. _NimbleWise (source): https://github.com/openedx/edx-platform/pull/21435#issuecomment-664674601
|
||||
|
||||
|
||||
Consequences
|
||||
|
||||
@@ -23,7 +23,7 @@ to automatically discover such apps and expose them via an API. This API will
|
||||
be used to list the installed apps that are available for a course and to
|
||||
enable/disable these apps using the API.
|
||||
|
||||
.. _Course Authoring MFE: https://github.com/edx/frontend-app-course-authoring/
|
||||
.. _Course Authoring MFE: https://github.com/openedx/frontend-app-course-authoring/
|
||||
|
||||
|
||||
Decision
|
||||
@@ -40,7 +40,7 @@ need a common interface for such apps so they can be enabled/disabled using
|
||||
a standard common interface.
|
||||
|
||||
To do this we can follow the example of existing plugins, [such as Course
|
||||
Tabs](https://github.com/edx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243),
|
||||
Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243),
|
||||
which provide a specific Python class that the plugin can inherit from, or
|
||||
implement. The required metadata and features, can be implemented as class
|
||||
attributes, and methods on this class.
|
||||
@@ -48,7 +48,7 @@ attributes, and methods on this class.
|
||||
We can then discover the installed apps using the existing tooling for plugins
|
||||
using a subclass of PluginManager designed for this purpose. Here is an example
|
||||
for [Course
|
||||
Tabs](https://github.com/edx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47)
|
||||
Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47)
|
||||
|
||||
It might not always make sense for an app installed in this way to be
|
||||
automatically show up for use on all courses. So each app will expose a method
|
||||
@@ -62,7 +62,7 @@ In the context of these apps, we need to distinguish between *installed*,
|
||||
|
||||
Let's look at an existing feature to explain those terms. The `edxnotes` app
|
||||
has [code that is part of the
|
||||
platform](https://github.com/edx/edx-platform/tree/636b2ca4c5add531cfce755fdb8965599acd79e0/lms/djangoapps/edxnotes).
|
||||
platform](https://github.com/openedx/edx-platform/tree/636b2ca4c5add531cfce755fdb8965599acd79e0/lms/djangoapps/edxnotes).
|
||||
This code comes preinstalled since it's part of the platform. So it is already
|
||||
*installed*, however no one can use it just yet, since it it needs to first be
|
||||
enabled globally. In the case of an external plugin, you consider it installed
|
||||
@@ -70,10 +70,10 @@ if it is `pip install`ed in the same environment in which edx-platform is
|
||||
running.
|
||||
|
||||
To make the feature *available* for use, you need to now [enable a feature
|
||||
flag](https://github.com/edx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/lms/envs/common.py#L531-L543).
|
||||
flag](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/lms/envs/common.py#L531-L543).
|
||||
Until this is set course authors/admins will [not even see the option of
|
||||
enabling this for their
|
||||
course](https://github.com/edx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/cms/djangoapps/models/settings/course_metadata.py#L91-L93).
|
||||
course](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/cms/djangoapps/models/settings/course_metadata.py#L91-L93).
|
||||
For course apps this is where the availability check comes in.
|
||||
|
||||
In the case of `edxnotes`, after setting the above feature flag, an option will
|
||||
|
||||
@@ -20,7 +20,7 @@ The tool will be added as an LTI integration. We will currently support only
|
||||
added later.
|
||||
|
||||
|
||||
.. _Course Authoring MFE: https://github.com/edx/frontend-app-course-authoring/
|
||||
.. _Course Authoring MFE: https://github.com/openedx/frontend-app-course-authoring/
|
||||
|
||||
|
||||
Decision
|
||||
|
||||
@@ -91,7 +91,7 @@ class ApiKeyPermissionMixIn:
|
||||
class EnrollmentUserThrottle(UserRateThrottle, ApiKeyPermissionMixIn):
|
||||
"""Limit the number of requests users can make to the enrollment API."""
|
||||
|
||||
# To see how the staff rate limit was selected, see https://github.com/edx/edx-platform/pull/18360
|
||||
# To see how the staff rate limit was selected, see https://github.com/openedx/edx-platform/pull/18360
|
||||
THROTTLE_RATES = {
|
||||
'user': '40/minute',
|
||||
'staff': '120/minute',
|
||||
|
||||
@@ -47,10 +47,10 @@ References
|
||||
----------
|
||||
|
||||
Model definition
|
||||
- https://github.com/edx/edx-platform/blob/a5ec801a2a91f928bf582ee9ba2092a5bfbe7d7e/openedx/core/djangoapps/external_user_ids/models.py#L17
|
||||
- https://github.com/openedx/edx-platform/blob/a5ec801a2a91f928bf582ee9ba2092a5bfbe7d7e/openedx/core/djangoapps/external_user_ids/models.py#L17
|
||||
|
||||
Anonymous User ID Table
|
||||
- https://github.com/edx/edx-platform/blob/6ee2089077b76581e14f230f0c9224757dbdb652/common/djangoapps/student/models.py#L130-L140
|
||||
- https://github.com/openedx/edx-platform/blob/6ee2089077b76581e14f230f0c9224757dbdb652/common/djangoapps/student/models.py#L130-L140
|
||||
|
||||
Some notes on why add a type table
|
||||
- https://www.itprotoday.com/sql-server/trouble-type-tables
|
||||
|
||||
@@ -27,10 +27,10 @@ Provider code
|
||||
|
||||
* The JwtBuilder_ uses the pyjwkest_ library for implementation of `JSON Web Signature (JWS)`_ and other crypto to build and sign JWT tokens.
|
||||
|
||||
.. _oauth_dispatch: https://github.com/edx/edx-platform/tree/master/openedx/core/djangoapps/oauth_dispatch
|
||||
.. _validator module: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py
|
||||
.. _Access Token View: https://github.com/edx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/djangoapps/oauth_dispatch/views.py#L89
|
||||
.. _JwtBuilder: https://github.com/edx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/lib/token_utils.py#L15
|
||||
.. _oauth_dispatch: https://github.com/openedx/edx-platform/tree/master/openedx/core/djangoapps/oauth_dispatch
|
||||
.. _validator module: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py
|
||||
.. _Access Token View: https://github.com/openedx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/djangoapps/oauth_dispatch/views.py#L89
|
||||
.. _JwtBuilder: https://github.com/openedx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/lib/token_utils.py#L15
|
||||
.. _pyjwkest: https://github.com/IdentityPython/pyjwkest
|
||||
.. _JSON Web Signature (JWS): https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41
|
||||
|
||||
@@ -47,4 +47,4 @@ Authentication by REST endpoints
|
||||
* Open edX REST endpoints that support JWTs as access tokens use JwtAuthentication_ as implemented by the edx-drf-extensions library.
|
||||
|
||||
.. _Django Rest Framework (DRF): https://github.com/encode/django-rest-framework
|
||||
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/master/edx_rest_framework_extensions/auth/jwt/README.rst
|
||||
.. _JwtAuthentication: https://github.com/openedx/edx-drf-extensions/blob/master/edx_rest_framework_extensions/auth/jwt/README.rst
|
||||
|
||||
@@ -91,10 +91,10 @@ unprotected microservices.
|
||||
* a `feature toggle (switch)`_ named "oauth2.enforce_jwt_scopes" is enabled.
|
||||
* **Note:** the toggle has since been retired with the equivalent of ``enforce_jwt_scopes`` value of True.
|
||||
|
||||
.. _edx-platform settings: https://github.com/edx/edx-platform/blob/master/lms/envs/docs/README.rst
|
||||
.. _JwtBuilder: https://github.com/edx/edx-platform/blob/d3d64970c36f36a96d684571ec5b48ed645618d8/openedx/core/lib/token_utils.py#L15
|
||||
.. _oauth_dispatch.views.AccessTokenView.dispatch: https://github.com/edx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/djangoapps/oauth_dispatch/views.py#L100
|
||||
.. _oauth_dispatch.validators: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py
|
||||
.. _edx-platform settings: https://github.com/openedx/edx-platform/blob/master/lms/envs/docs/README.rst
|
||||
.. _JwtBuilder: https://github.com/openedx/edx-platform/blob/d3d64970c36f36a96d684571ec5b48ed645618d8/openedx/core/lib/token_utils.py#L15
|
||||
.. _oauth_dispatch.views.AccessTokenView.dispatch: https://github.com/openedx/edx-platform/blob/d21a09828072504bc97a2e05883c1241e3a35da9/openedx/core/djangoapps/oauth_dispatch/views.py#L100
|
||||
.. _oauth_dispatch.validators: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py
|
||||
|
||||
4. Associate Available Scopes with Applications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -189,7 +189,7 @@ See 0007-include-organizations-in-tokens_ for decisions on this.
|
||||
.. _function-based Django views: https://docs.djangoproject.com/en/2.0/topics/http/views/
|
||||
.. _Django Rest Framework (DRF): http://www.django-rest-framework.org/
|
||||
.. _Python decorator: http://www.django-rest-framework.org/tutorial/2-requests-and-responses/#wrapping-api-views
|
||||
.. _JwtAuthentication: https://github.com/edx/edx-drf-extensions/blob/4569b9bf7e54a917d4acdd545b10c058c960dd1a/edx_rest_framework_extensions/auth/jwt/authentication.py#L17
|
||||
.. _JwtAuthentication: https://github.com/openedx/edx-drf-extensions/blob/4569b9bf7e54a917d4acdd545b10c058c960dd1a/edx_rest_framework_extensions/auth/jwt/authentication.py#L17
|
||||
|
||||
|
||||
Consequences
|
||||
|
||||
@@ -119,8 +119,8 @@ organization information to the granting end-user.
|
||||
values returned in their payloads by the specified filters.
|
||||
|
||||
.. _0006-enforce-scopes-in-LMS-APIs: 0006-enforce-scopes-in-LMS-APIs.rst
|
||||
.. _Organization: https://github.com/edx/edx-organizations/blob/fa137881be9b7d330062bc32655a00c68635cfed/organizations/models.py#L14
|
||||
.. _JwtBuilder: https://github.com/edx/edx-platform/blob/d3d64970c36f36a96d684571ec5b48ed645618d8/openedx/core/lib/token_utils.py#L15
|
||||
.. _Organization: https://github.com/openedx/edx-organizations/blob/fa137881be9b7d330062bc32655a00c68635cfed/organizations/models.py#L14
|
||||
.. _JwtBuilder: https://github.com/openedx/edx-platform/blob/d3d64970c36f36a96d684571ec5b48ed645618d8/openedx/core/lib/token_utils.py#L15
|
||||
|
||||
3. Organization Information in Authorization Approval Form
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -23,14 +23,14 @@ But to verify that the JWT was created by the OAuth Provider, the client should
|
||||
sent along with the JWT. Since the secret is "symmetric" any OAuth Client that is privy to the secret
|
||||
could also have just as easily created the JWT (thus spoofing the OAuth Provider).
|
||||
|
||||
.. _`Use JWT as OAuth2 Tokens; Remove OpenID Connect`: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0003-use-jwt-as-oauth-tokens-remove-openid-connect.rst
|
||||
.. _`Use JWT as OAuth2 Tokens; Remove OpenID Connect`: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0003-use-jwt-as-oauth-tokens-remove-openid-connect.rst
|
||||
|
||||
Additionally, for clients that still use Open ID Connect, their `ID Tokens are HMACed with their own
|
||||
client_secret`_ (privately shared with the OAuth Provider). Although this somewhat mitigates the issue
|
||||
above since each OAuth Client can no longer create tokens verifiable by other Clients, it does not
|
||||
allow a Client to forward a verifiable token to other Clients.
|
||||
|
||||
.. _ID Tokens are HMACed with their own client_secret: https://github.com/edx/edx-oauth2-provider/blob/7e59e30ae0bfd9eac4d05469768d79c50a90aeb7/edx_oauth2_provider/views.py#L155-L163
|
||||
.. _ID Tokens are HMACed with their own client_secret: https://github.com/openedx/edx-oauth2-provider/blob/7e59e30ae0bfd9eac4d05469768d79c50a90aeb7/edx_oauth2_provider/views.py#L155-L163
|
||||
|
||||
Looking forward, we want to support Single Page Apps (a.k.a., Microfronteds), where users can seamlessly
|
||||
traverse from one microfronted to another and access APIs on various backends. This *Single Sign On*
|
||||
@@ -75,11 +75,11 @@ Additionally, **JWT_ISSUERS** is not intended to be used for key rotation. Rathe
|
||||
keys should be specified as a `JSON Web Key Set (JWK Set)`_ instead. Thus, there would only be a single
|
||||
issuer, but with (the potential of) multiple signing keys stored in a JWT Set.
|
||||
|
||||
.. _edx_rest_framework_extensions.settings: https://github.com/edx/edx-drf-extensions/blob/1db9f5e3e5130a1e0f43af2035489b3ed916d245/edx_rest_framework_extensions/settings.py#L73
|
||||
.. _edx_rest_framework_extensions.settings: https://github.com/openedx/edx-drf-extensions/blob/1db9f5e3e5130a1e0f43af2035489b3ed916d245/edx_rest_framework_extensions/settings.py#L73
|
||||
.. _JWT standard: https://tools.ietf.org/html/rfc7519
|
||||
.. _issuer: https://tools.ietf.org/html/rfc7519#section-4.1.1
|
||||
.. _JSON Web Key Set (JWK Set): https://tools.ietf.org/html/draft-ietf-jose-json-web-key-36#section-5
|
||||
.. _site configuration: https://github.com/edx/edx-platform/blob/af841336c7e39d634c238cd8a11c5a3a661aa9e2/openedx/core/djangoapps/site_configuration/__init__.py
|
||||
.. _site configuration: https://github.com/openedx/edx-platform/blob/af841336c7e39d634c238cd8a11c5a3a661aa9e2/openedx/core/djangoapps/site_configuration/__init__.py
|
||||
|
||||
Example Code
|
||||
------------
|
||||
|
||||
@@ -33,8 +33,8 @@ believe any decisions in this record will neither affect the current authenticat
|
||||
apps nor impact forward compatibility when/if mobile apps are consolidated to use a similar (if not the same)
|
||||
authentication mechanism as outlined here for web apps.
|
||||
|
||||
.. _Use JWT as OAuth2 Tokens: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0003-use-jwt-as-oauth-tokens-remove-openid-connect.rst
|
||||
.. _Use Asymmetric JWTs: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst
|
||||
.. _Use JWT as OAuth2 Tokens: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0003-use-jwt-as-oauth-tokens-remove-openid-connect.rst
|
||||
.. _Use Asymmetric JWTs: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst
|
||||
.. _Decoupled Frontend Architecture: https://openedx.atlassian.net/wiki/spaces/FEDX/pages/790692200/Decoupled+Frontend+Architecture
|
||||
.. _microfrontend: https://micro-frontends.org/
|
||||
|
||||
@@ -92,8 +92,8 @@ Login -> Cookie -> API
|
||||
.. _JWT_AUTH_COOKIE: https://github.com/GetBlimp/django-rest-framework-jwt/blob/master/docs/index.md#jwt_auth_cookie
|
||||
.. _JSONWebTokenAuthentication: https://github.com/GetBlimp/django-rest-framework-jwt/blob/0a0bd402ec21fd6b9a5f715d114411836fbb2923/rest_framework_jwt/authentication.py#L71
|
||||
.. _automatically extracts the JWT from the cookie: https://github.com/GetBlimp/django-rest-framework-jwt/blob/0a0bd402ec21fd6b9a5f715d114411836fbb2923/rest_framework_jwt/authentication.py#L86-L87
|
||||
.. _JwtRedirectToLoginIfUnauthenticatedMiddleware: https://github.com/edx/edx-drf-extensions/blob/0351010f1836e4cebd6bdc757d477b2f56265b17/edx_rest_framework_extensions/auth/jwt/middleware.py#L76
|
||||
.. _LoginRedirectIfUnauthenticated: https://github.com/edx/edx-drf-extensions/blob/0351010f1836e4cebd6bdc757d477b2f56265b17/edx_rest_framework_extensions/permissions.py#L147
|
||||
.. _JwtRedirectToLoginIfUnauthenticatedMiddleware: https://github.com/openedx/edx-drf-extensions/blob/0351010f1836e4cebd6bdc757d477b2f56265b17/edx_rest_framework_extensions/auth/jwt/middleware.py#L76
|
||||
.. _LoginRedirectIfUnauthenticated: https://github.com/openedx/edx-drf-extensions/blob/0351010f1836e4cebd6bdc757d477b2f56265b17/edx_rest_framework_extensions/permissions.py#L147
|
||||
|
||||
|
||||
JWT Cookie Lifetime
|
||||
@@ -124,7 +124,7 @@ JWT Cookie Lifetime
|
||||
which will remove them from the user's browser cookie jar. Thus, the user will be logged out of all the
|
||||
microfrontends.
|
||||
|
||||
.. _`current open edX session cookies that may have no expiration`: https://github.com/edx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27
|
||||
.. _`current open edX session cookies that may have no expiration`: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27
|
||||
.. _JWT blacklist: https://auth0.com/blog/blacklist-json-web-token-api-keys/
|
||||
.. _`JWT ID (jti)`: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#jtiDef
|
||||
|
||||
@@ -148,7 +148,7 @@ JWT Cookie Content
|
||||
.. _HTTP Cookie RFC standard: https://tools.ietf.org/html/rfc6265
|
||||
.. _up to 4096 bytes: https://tools.ietf.org/html/rfc6265#section-6.1
|
||||
.. _Modern browsers have treated this requirement as a maximum: http://browsercookielimits.squawky.net/
|
||||
.. _currently embedded in the JWT: https://github.com/edx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/openedx/core/lib/token_utils.py#L13
|
||||
.. _currently embedded in the JWT: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/openedx/core/lib/token_utils.py#L13
|
||||
|
||||
|
||||
JWT Cookie Security
|
||||
@@ -208,7 +208,7 @@ Consequences
|
||||
|
||||
.. _at least 4096 bytes: http://browsercookielimits.squawky.net/
|
||||
.. _JWT sessionStorage and localStorage Security: https://stormpath. com/blog/where-to-store-your-jwts-cookies-vs-html5-web-storage#so-whats-the-difference
|
||||
.. _JS-accessible user-info cookie: https://github.com/edx/edx-platform/blob/70d1ca474012b89e4c7184d25499eb87b3135409/common/djangoapps/student/cookies.py#L151
|
||||
.. _JS-accessible user-info cookie: https://github.com/openedx/edx-platform/blob/70d1ca474012b89e4c7184d25499eb87b3135409/common/djangoapps/student/cookies.py#L151
|
||||
|
||||
References
|
||||
----------
|
||||
|
||||
@@ -23,7 +23,7 @@ Each backend service uses a unique SECRET_KEY to produce the CSRF token, so a CS
|
||||
be valid for another service. Therefore, frontend apps served by different subdomains will not have access to these CSRF
|
||||
token cookies.
|
||||
|
||||
.. _Transport JWT in HTTP Cookies: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst
|
||||
.. _Transport JWT in HTTP Cookies: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst
|
||||
.. _Django CSRF Protection: https://docs.djangoproject.com/en/2.1/ref/csrf/
|
||||
|
||||
Decisions
|
||||
@@ -43,8 +43,8 @@ Decisions
|
||||
Endpoint described above to obtain a valid CSRF token for the given backend service for which a request is
|
||||
being made.
|
||||
|
||||
.. _edx-drf-extensions: https://github.com/edx/edx-drf-extensions
|
||||
.. _@edx/frontend-auth: https://github.com/edx/frontend-auth
|
||||
.. _edx-drf-extensions: https://github.com/openedx/edx-drf-extensions
|
||||
.. _@edx/frontend-auth: https://github.com/openedx/frontend-auth
|
||||
|
||||
Rejected Alternatives
|
||||
---------------------
|
||||
|
||||
@@ -48,6 +48,6 @@ This would result in a JWT that contains the following, assuming these two scope
|
||||
|
||||
Note: Every JWT access token created using a given OAuth Application will include **all filters** defined for that application. This was also true as of the initial introduction of filters.
|
||||
|
||||
.. _EdxOAuth2AuthorizationView: https://github.com/edx/edx-platform/blob/9cf2f9f298e5e8be3b3abcaadaf0b7a96d0de0df/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py#L16
|
||||
.. _EdxOAuth2AuthorizationView: https://github.com/openedx/edx-platform/blob/9cf2f9f298e5e8be3b3abcaadaf0b7a96d0de0df/openedx/core/djangoapps/oauth_dispatch/dot_overrides/views.py#L16
|
||||
.. _BOM-1291: https://openedx.atlassian.net/browse/BOM-1291
|
||||
.. _Transport JWT in HTTP Cookies: 0007-include-organizations-in-tokens.rst
|
||||
|
||||
@@ -34,7 +34,7 @@ The scope can be protected using the already existing `JwtHasScope`_ DRF permiss
|
||||
The new filter permission class, ``JwtHasTpaProviderFilterForRequestedProvider``, will be implemented in edx-platform to start because it is only used by an edx-platform view, ``UserMappingView``. Additionally, the permission class is used in conjunction with other legacy permissions and it is simpler to keep all the tests together.
|
||||
|
||||
.. _More General Scope Filter Support: 0011-scope-filter-support.rst
|
||||
.. _JwtHasScope: https://github.com/edx/edx-drf-extensions/blob/64f831d715d14dc2db5a1046201ff14e92fa7c9f/edx_rest_framework_extensions/permissions.py#L70
|
||||
.. _JwtHasScope: https://github.com/openedx/edx-drf-extensions/blob/64f831d715d14dc2db5a1046201ff14e92fa7c9f/edx_rest_framework_extensions/permissions.py#L70
|
||||
|
||||
Consequences
|
||||
------------
|
||||
@@ -43,4 +43,4 @@ Consequences
|
||||
|
||||
* The complicated method of handling compound permissions, like `JWT_RESTRICTED_APPLICATION_OR_USER_ACCESS`_ from edx-drf-extensions, needs to be duplicated in edx-platform to properly handle Restricted Applications and ``JwtHasTpaProviderFilterForRequestedProvider``. Simplifying this design is being left to a later decision.
|
||||
|
||||
.. _JWT_RESTRICTED_APPLICATION_OR_USER_ACCESS: https://github.com/edx/edx-drf-extensions/blob/64f831d715d14dc2db5a1046201ff14e92fa7c9f/edx_rest_framework_extensions/permissions.py#L171
|
||||
.. _JWT_RESTRICTED_APPLICATION_OR_USER_ACCESS: https://github.com/openedx/edx-drf-extensions/blob/64f831d715d14dc2db5a1046201ff14e92fa7c9f/edx_rest_framework_extensions/permissions.py#L171
|
||||
|
||||
@@ -58,4 +58,4 @@ For migrating the mobile authentication flow from opaque Bearer access tokens to
|
||||
* We need to check if the JWT was asymmetrically signed by the LMS. We want to ensure that a symmetrically signed JWT, created (signed) by another IDA, could not be compromised and used by an attacker to exchange for a session cookie, which would allow for full compromise of the user.
|
||||
* Implementation will involve adding a method to ``edx-drf-extensions`` like ``get_decoded_jwt_from_auth``, but that will decode only asymmetric JWTs.
|
||||
|
||||
.. _ADR to add grant type in JWT payload: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0014-add-grant-type-in-jwt-payload.rst
|
||||
.. _ADR to add grant type in JWT payload: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0014-add-grant-type-in-jwt-payload.rst
|
||||
|
||||
@@ -120,5 +120,5 @@ to test other grant types if they are substituted in the appropriate places.
|
||||
.. _OAuth2 standard: https://tools.ietf.org/html/rfc6749
|
||||
.. _Google's OAuth2 Playground: https://developers.google.com/oauthplayground
|
||||
.. _Authorization Code grant type: https://tools.ietf.org/html/rfc6749#section-4.1
|
||||
.. _Restricted Application: https://github.com/edx/edx-platform/blob/dd136b457bc8a25892445fc4362ce02838179472/openedx/core/djangoapps/oauth_dispatch/models.py#L12
|
||||
.. _Restricted Application: https://github.com/openedx/edx-platform/blob/dd136b457bc8a25892445fc4362ce02838179472/openedx/core/djangoapps/oauth_dispatch/models.py#L12
|
||||
.. _localtunnel: https://localtunnel.github.io/www/
|
||||
|
||||
@@ -35,7 +35,7 @@ class Command(BaseCommand):
|
||||
length 'key-id-size' (unless you explicitly provide a "kid" of your own via
|
||||
the 'key-id' option).
|
||||
|
||||
See https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst
|
||||
See https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0008-use-asymmetric-jwts.rst
|
||||
'''
|
||||
|
||||
def create_parser(self, *args, **kwargs): # pylint: disable=arguments-differ
|
||||
@@ -144,7 +144,7 @@ class Command(BaseCommand):
|
||||
print(" # The following is the string representation of a JSON Web Key Set (JWK set)")
|
||||
print(" # containing all active public keys for verifying JWT signatures.")
|
||||
print(
|
||||
" # See https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/"
|
||||
" # See https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/"
|
||||
"docs/decisions/0008-use-asymmetric-jwts.rst"
|
||||
)
|
||||
print(" ")
|
||||
@@ -172,7 +172,7 @@ class Command(BaseCommand):
|
||||
print(" # The following is the string representation of a JSON Web Key (JWK)")
|
||||
print(" # containing the single active private key for signing JSON Web Tokens (JWTs).")
|
||||
print(
|
||||
" # See https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/"
|
||||
" # See https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/"
|
||||
"docs/decisions/0008-use-asymmetric-jwts.rst"
|
||||
)
|
||||
print(" ")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"""
|
||||
Deletes the ENFORCE_JWT_SCOPES waffle switch that has already been deprecated and removed.
|
||||
|
||||
See https://github.com/edx/edx-platform/pull/23188 for the removal
|
||||
See https://github.com/openedx/edx-platform/pull/23188 for the removal
|
||||
"""
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -10,7 +10,7 @@ from openedx.core.djangoapps.plugins.constants import ProjectType
|
||||
class OlxRestApiAppConfig(AppConfig):
|
||||
"""
|
||||
Configuration for the olx_rest_api Django plugin application.
|
||||
See: https://github.com/edx/edx-platform/blob/master/openedx/core/djangoapps/plugins/README.rst
|
||||
See: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/plugins/README.rst
|
||||
"""
|
||||
|
||||
name = 'openedx.core.djangoapps.olx_rest_api'
|
||||
|
||||
@@ -5,4 +5,4 @@ This app provides edx-platform specific constants and support for the Django Plu
|
||||
|
||||
It enables you to add a plugin to LMS or CMS, including ensuring Django signals work correctly between edx-platform and installed plugins.
|
||||
|
||||
.. _edx_django_utils/plugins: https://github.com/edx/edx-django-utils/tree/master/edx_django_utils/plugins
|
||||
.. _edx_django_utils/plugins: https://github.com/openedx/edx-django-utils/tree/master/edx_django_utils/plugins
|
||||
@@ -29,7 +29,7 @@ class SettingsType():
|
||||
values (in addition to ProjectType) to declare explicitly which settings
|
||||
(in the specified project) they are extending.
|
||||
|
||||
See https://github.com/edx/edx-platform/master/lms/envs/docs/README.rst for
|
||||
See https://github.com/openedx/edx-platform/master/lms/envs/docs/README.rst for
|
||||
further information on each Settings Type.
|
||||
"""
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ Decision
|
||||
|
||||
It was decided to extract this plugin infrastructure to make it reusable. More info on this extraction can be found in `extraction decision doc`_ in edx-django-utils repository.
|
||||
|
||||
.. _extraction decision doc: https://github.com/edx/edx-django-utils/blob/master/docs/decisions/0002-extract-plugins-infrastructure-from-edx-platform.rst
|
||||
.. _extraction decision doc: https://github.com/openedx/edx-django-utils/blob/master/docs/decisions/0002-extract-plugins-infrastructure-from-edx-platform.rst
|
||||
@@ -123,7 +123,7 @@ LOG_REQUEST_USER_CHANGES = getattr(settings, 'LOG_REQUEST_USER_CHANGES', False)
|
||||
# .. toggle_warning: Logging headers of subsequent requests following a mismatch will only work if
|
||||
# LOG_REQUEST_USER_CHANGES is enabled and ENFORCE_SAFE_SESSIONS is disabled; otherwise, only headers of the inital
|
||||
# mismatch will be logged. Also, SAFE_SESSIONS_DEBUG_PUBLIC_KEY must be set. See
|
||||
# https://github.com/edx/edx-platform/blob/master/common/djangoapps/util/log_sensitive.py
|
||||
# https://github.com/openedx/edx-platform/blob/master/common/djangoapps/util/log_sensitive.py
|
||||
# for instructions.
|
||||
# .. toggle_use_cases: opt_in
|
||||
# .. toggle_creation_date: 2021-12-22
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReturnGroup1PartitionScheme:
|
||||
def get_group_for_user(cls, course_key, user, user_partition, assign=True): # pylint: disable=unused-argument
|
||||
"""
|
||||
The previous "allow" definition for verification was defined as 1, so return that.
|
||||
Details at https://github.com/edx/edx-platform/pull/14913/files#diff-feff1466ec4d1b8c38894310d8342a80
|
||||
Details at https://github.com/openedx/edx-platform/pull/14913/files#diff-feff1466ec4d1b8c38894310d8342a80
|
||||
"""
|
||||
return user_partition.get_group(1)
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ def _create_and_set_jwt_cookies(response, request, cookie_settings, user=None):
|
||||
|
||||
# Skip setting JWT cookies for most unit tests, since it raises errors when
|
||||
# a login oauth client cannot be found in the database in ``_get_login_oauth_client``.
|
||||
# This solution is not ideal, but see https://github.com/edx/edx-platform/pull/19180#issue-226706355
|
||||
# This solution is not ideal, but see https://github.com/openedx/edx-platform/pull/19180#issue-226706355
|
||||
# for a discussion of alternative solutions that did not work or were halted.
|
||||
if settings.FEATURES.get('DISABLE_SET_JWT_COOKIES_FOR_TESTS', False):
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@ from edx_toggles.toggles import WaffleSwitch
|
||||
# .. toggle_description: Displays the maintenance warning, when active.
|
||||
# .. toggle_use_cases: opt_in
|
||||
# .. toggle_creation_date: 2018-03-20
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/17735
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/17735
|
||||
DISPLAY_MAINTENANCE_WARNING = WaffleSwitch(
|
||||
'open_edx_util.display_maintenance_warning', __name__
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ class HLSPlaybackEnabledFlag(ConfigurationModel):
|
||||
.. toggle_description: Add the "hls" profile to all displayed videos on the platform.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2017-04-19
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/14924
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/14924
|
||||
"""
|
||||
# this field overrides course-specific settings
|
||||
enabled_for_all_courses = BooleanField(default=False)
|
||||
@@ -76,7 +76,7 @@ class CourseHLSPlaybackEnabledFlag(ConfigurationModel):
|
||||
.. toggle_description: Add the "hls" profile to all displayed videos for a single course.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2017-04-19
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/14924
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/14924
|
||||
"""
|
||||
KEY_FIELDS = ('course_id',)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ LOG_PREFIX = 'Videos: '
|
||||
# to YouTube as part of the video pipeline.
|
||||
# .. toggle_use_cases: open_edx
|
||||
# .. toggle_creation_date: 2018-08-03
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/18765
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/18765
|
||||
DEPRECATE_YOUTUBE = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.deprecate_youtube', __name__, LOG_PREFIX)
|
||||
|
||||
# .. toggle_name: videos.enable_devstack_video_uploads
|
||||
@@ -31,7 +31,7 @@ DEPRECATE_YOUTUBE = CourseWaffleFlag(f'{WAFFLE_NAMESPACE}.deprecate_youtube', __
|
||||
# .. toggle_creation_date: 2020-03-12
|
||||
# .. toggle_warning: Enabling this feature requires that the ROLE_ARN, MFA_SERIAL_NUMBER, MFA_TOKEN settings are
|
||||
# properly defined.
|
||||
# .. toggle_tickets: https://github.com/edx/edx-platform/pull/23375
|
||||
# .. toggle_tickets: https://github.com/openedx/edx-platform/pull/23375
|
||||
ENABLE_DEVSTACK_VIDEO_UPLOADS = WaffleFlag(f'{WAFFLE_NAMESPACE}.enable_devstack_video_uploads', __name__, LOG_PREFIX)
|
||||
|
||||
ENABLE_VEM_PIPELINE = CourseWaffleFlag( # lint-amnesty, pylint: disable=toggle-missing-annotation
|
||||
|
||||
@@ -23,7 +23,7 @@ class VEMPipelineIntegration(ConfigurationModel):
|
||||
video pipeline.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2020-06-04
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/24093
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/24093
|
||||
"""
|
||||
client_name = models.CharField(
|
||||
max_length=100,
|
||||
@@ -64,7 +64,7 @@ class VideoUploadsEnabledByDefault(ConfigurationModel):
|
||||
enables the "Video Uploads" menu in the CMS.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2017-11-10
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/16536
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/16536
|
||||
"""
|
||||
# this field overrides course-specific settings
|
||||
enabled_for_all_courses = models.BooleanField(default=False)
|
||||
@@ -114,7 +114,7 @@ class CourseVideoUploadsEnabledByDefault(ConfigurationModel):
|
||||
"Video Uploads" menu in the CMS.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2017-11-10
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/16536
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/16536
|
||||
"""
|
||||
KEY_FIELDS = ('course_id',)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Decision
|
||||
|
||||
These utilities will be be moved to `edx/edx-toggles`_ so that they can be used by other IDAs. Additionally, the shared library will use the module name ``toggles``, rather than ``waffle_utils``, so it can more generally include non-waffle based toggle utilities as well.
|
||||
|
||||
.. _edx/edx-toggles: https://github.com/edx/edx-toggles
|
||||
.. _edx/edx-toggles: https://github.com/openedx/edx-toggles
|
||||
|
||||
Consequences
|
||||
============
|
||||
@@ -31,5 +31,5 @@ Consequences
|
||||
|
||||
* The helper `get_instance_module_name`_ should probably move to `edx_django_utils/monitoring/code_owner`_. It could be considered hacky, but is quite useful. It needs to work whether the class definition is in a library or an IDA, and whether the instance declaration is in a library or an IDA.
|
||||
|
||||
.. _get_instance_module_name: https://github.com/edx/edx-platform/blob/a8c3413a32510dc45301d0c462bf706a5f7ba487/openedx/core/djangoapps/waffle_utils/__init__.py#L521
|
||||
.. _edx_django_utils/monitoring/code_owner: https://github.com/edx/edx-django-utils/tree/master/edx_django_utils/monitoring/code_owner
|
||||
.. _get_instance_module_name: https://github.com/openedx/edx-platform/blob/a8c3413a32510dc45301d0c462bf706a5f7ba487/openedx/core/djangoapps/waffle_utils/__init__.py#L521
|
||||
.. _edx_django_utils/monitoring/code_owner: https://github.com/openedx/edx-django-utils/tree/master/edx_django_utils/monitoring/code_owner
|
||||
|
||||
@@ -17,7 +17,7 @@ Additionally, the fully qualified waffle name, including the namespace, is requi
|
||||
|
||||
Lastly, the namespace classes contain a lot of logic, but in effect, they only are used to ensure the flag name has a prefix like '<NAMESPACE_NAME>.<FLAG_NAME>'.
|
||||
|
||||
.. _example switch in ecommerce: https://github.com/edx/ecommerce/blob/e899c78325ac492d0a2b1ea0aab4d5e230262b8f/ecommerce/extensions/dashboard/users/views.py#L21
|
||||
.. _example switch in ecommerce: https://github.com/openedx/ecommerce/blob/e899c78325ac492d0a2b1ea0aab4d5e230262b8f/ecommerce/extensions/dashboard/users/views.py#L21
|
||||
|
||||
Decision
|
||||
========
|
||||
|
||||
@@ -129,8 +129,8 @@ def get_handler_url(request, usage_key_str, handler_name):
|
||||
|
||||
# We cannot use DRF for this endpoint because its Request object is incompatible
|
||||
# with the API expected by XBlock handlers.
|
||||
# See https://github.com/edx/edx-platform/pull/19253
|
||||
# and https://github.com/edx/XBlock/pull/383 for context.
|
||||
# See https://github.com/openedx/edx-platform/pull/19253
|
||||
# and https://github.com/openedx/XBlock/pull/383 for context.
|
||||
@csrf_exempt
|
||||
@xframe_options_exempt
|
||||
def xblock_handler(request, user_id, secure_token, usage_key_str, handler_name, suffix=None):
|
||||
|
||||
@@ -14,7 +14,7 @@ def plugin_settings(settings):
|
||||
.. toggle_warning: TinyMCE is needed to show an editor in the studio.
|
||||
.. toggle_use_cases: open_edx
|
||||
.. toggle_creation_date: 2017-11-08
|
||||
.. toggle_tickets: https://github.com/edx/edx-platform/pull/16496
|
||||
.. toggle_tickets: https://github.com/openedx/edx-platform/pull/16496
|
||||
"""
|
||||
settings.FEATURES['ENABLE_ANNOUNCEMENTS'] = False
|
||||
# Configure number of announcements to show per page
|
||||
|
||||
@@ -59,4 +59,4 @@ The course experience consists of a number of views:
|
||||
A number of the features in the course experience are controlled via Waffle
|
||||
flags. For documentation, see `Waffle flag definitions`_.
|
||||
|
||||
.. _Waffle flag definitions: https://github.com/edx/edx-platform/blob/master/openedx/features/course_experience/__init__.py
|
||||
.. _Waffle flag definitions: https://github.com/openedx/edx-platform/blob/master/openedx/features/course_experience/__init__.py
|
||||
|
||||
@@ -65,7 +65,7 @@ Decisions
|
||||
|
||||
c. We do not want to make a synchronous call from the Ecommerce backend to the LMS every time the basket
|
||||
page is loaded. See this decision record link for more information:
|
||||
https://github.com/edx/Ecommerce/blob/master/docs/decisions/0002-no-synchronous-calls.rst However,
|
||||
https://github.com/openedx/Ecommerce/blob/master/docs/decisions/0002-no-synchronous-calls.rst However,
|
||||
we are happy to make an ajax call from the front-end.
|
||||
The basket page needs this information for two reasons: 1) So that the correct price is shown to the user,
|
||||
and the user is informed that they are recieving a discount. 2) So that the correct price is charged to
|
||||
|
||||
@@ -4,4 +4,4 @@ Enterprise Support
|
||||
This directory contains a Django application to support usage of
|
||||
enterprise features within edx-platform. The majority of the capabilities
|
||||
are provided through the external edx-enterprise library that can be found
|
||||
here: `https://github.com/edx/edx-enterprise`_.
|
||||
here: `https://github.com/openedx/edx-enterprise`_.
|
||||
|
||||
@@ -3,4 +3,4 @@ Name Affirmation API
|
||||
|
||||
This directory contains a passthrough for the edx-name-affirmation plugin,
|
||||
in order to enable support in other plugins/packages such as edx-proctoring.
|
||||
See here: `https://github.com/edx/edx-name-affirmation`_.
|
||||
See here: `https://github.com/openedx/edx-name-affirmation`_.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Utility functions for integration with Name Affirmation plugin
|
||||
(https://github.com/edx/edx-name-affirmation)
|
||||
(https://github.com/openedx/edx-name-affirmation)
|
||||
"""
|
||||
|
||||
from edx_django_utils.plugins import PluginError, PluginManager
|
||||
|
||||
@@ -20,7 +20,7 @@ class DuplicateXBlockTest(Exception):
|
||||
either case, it'd be nice to resolve (likely by renaming tests as they
|
||||
come in, hopefully still being careful to catch collisions which might
|
||||
effect deployed XBlocks. See discussion at:
|
||||
https://github.com/edx/edx-platform/pull/11032#discussion_r48097392).
|
||||
https://github.com/openedx/edx-platform/pull/11032#discussion_r48097392).
|
||||
'''
|
||||
pass # lint-amnesty, pylint: disable=unnecessary-pass
|
||||
|
||||
@@ -47,7 +47,7 @@ for entrypoint in pkg_resources.iter_entry_points(group="xblock.test.v0"):
|
||||
# This should never happen, but while we're testing for class name
|
||||
# validity, we figured it was okay to be a little overly defensive.
|
||||
# See discussion at:
|
||||
# https://github.com/edx/edx-platform/pull/11032#discussion_r48097392
|
||||
# https://github.com/openedx/edx-platform/pull/11032#discussion_r48097392
|
||||
if not classname.replace("_", "").isalnum():
|
||||
raise InvalidTestName("Python variables should be letters, numbers, and underscores: " + classname)
|
||||
globals()[classname] = plugin
|
||||
|
||||
Reference in New Issue
Block a user