diff --git a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py index ff901d0e9b..16c8f5fd2c 100644 --- a/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py +++ b/openedx/core/djangoapps/oauth_dispatch/dot_overrides/validators.py @@ -100,6 +100,13 @@ class EdxOAuth2Validator(OAuth2Validator): client credentials, add `user_id` as a default scope if it is an allowed scope. """ default_scopes = super().get_default_scopes(client_id, request, *args, **kwargs) + # .. toggle_name: ENABLE_USER_ID_SCOPE + # .. toggle_implementation:DjangoSetting + # .. toggle_description: If enabled, the user_id scope will be added to the default scopes for client_credentials grant type. + # .. toggle_default: False + # .. toggle_use_case: Temporary Feature Flag + # .. toggle_warnings: This feature flag is temporary and will be removed once the feature is fully tested. + # .. toggle_ticket: https://2u-internal.atlassian.net/browse/ENT-8641 (toggle removal ticket) if settings.FEATURES.get('ENABLE_USER_ID_SCOPE', False): if request.grant_type == 'client_credentials' and not request.scopes: if get_scopes_backend().has_user_id_in_application_scopes(application=request.client):