-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edx-username-changer plugin settings added #424
base: main
Are you sure you want to change the base?
Changes from 1 commit
4a286cb
55df2a2
066348e
e1074b1
fc69052
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
marslanabdulrauf marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ Configurations | |
-------------- | ||
To configure this plugin, you need to do the following one step: | ||
|
||
1. Add/Enable a feature flag (ENABLE_EDX_USERNAME_CHANGER) into your environment variables (through ``private.py`` in LMS or CMS, depending upon where you are installing the plugin) | ||
1. Add/Enable a feature flag (ENABLE_EDX_USERNAME_CHANGER) into your environment variables (through ``private.py`` in LMS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove CMS from line 31 as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should not if the plugins works well both from LMS and CMS, Check my above comment on BUILD file. |
||
|
||
.. code-block:: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python_sources(name="edx_username_changer_settings") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# noqa: INP001 | ||
|
||
"""Settings to provide to edX""" | ||
|
||
|
||
def plugin_settings(settings): | ||
""" | ||
Populate common settings | ||
""" | ||
env_tokens = getattr(settings, "ENV_TOKENS", {}) | ||
|
||
# .. setting_name: ENABLE_EDX_USERNAME_CHANGER | ||
# .. setting_default: False | ||
# .. setting_description: Enable/Disable the username changer plugin | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The setting docs look different for feature flags too. An example is ALLOW_PUBLIC_ACCOUNT_CREATION |
||
|
||
settings.ENABLE_EDX_USERNAME_CHANGER = env_tokens.get( | ||
"ENABLE_EDX_USERNAME_CHANGER", False | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are using the feature flag from This makes the settings and their usage inconsistent. @Anas12091101 I think in your testing you still had the username changer in the features dictionary that's why this would have worked. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked into this and found that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sounds good to me |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# noqa: INP001 | ||
|
||
"""Settings to provide to edX""" | ||
|
||
|
||
def plugin_settings(settings): | ||
""" | ||
Populate devstack settings | ||
""" | ||
settings.ENABLE_EDX_USERNAME_CHANGER = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove cms from
entry_points