Add flag to enable password change form in admin
This was previously disabled because changing another user's password is both not usually recommended and bypasses password policy. Here, we add a feature flag (`ENABLE_CHANGE_USER_PASSWORD_ADMIN`) to allow re-enabling this password change form. This allows continued use of this functionality by clients that require it.
This commit is contained in:
@@ -329,6 +329,19 @@ FEATURES = {
|
||||
'SHOW_FOOTER_LANGUAGE_SELECTOR': False,
|
||||
'ENABLE_ENROLLMENT_RESET': False,
|
||||
'DISABLE_MOBILE_COURSE_AVAILABLE': False,
|
||||
|
||||
# .. toggle_name: ENABLE_CHANGE_USER_PASSWORD_ADMIN
|
||||
# .. toggle_implementation: DjangoSetting
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: Set to True to enable changing a user password through django admin. This is disabled by default because enabling allows a method to bypass password policy.
|
||||
# .. toggle_category: admin
|
||||
# .. toggle_use_cases: open_edx
|
||||
# .. toggle_creation_date: 2020-02-21
|
||||
# .. toggle_expiration_date: None
|
||||
# .. toggle_tickets: 'https://github.com/edx/edx-platform/pull/21616'
|
||||
# .. toggle_status: supported
|
||||
# .. toggle_warnings: None
|
||||
'ENABLE_CHANGE_USER_PASSWORD_ADMIN': False,
|
||||
}
|
||||
|
||||
ENABLE_JASMINE = False
|
||||
|
||||
@@ -215,8 +215,9 @@ if settings.FEATURES.get('ENABLE_SERVICE_STATUS'):
|
||||
|
||||
# The password pages in the admin tool are disabled so that all password
|
||||
# changes go through our user portal and follow complexity requirements.
|
||||
if not settings.FEATURES.get('ENABLE_CHANGE_USER_PASSWORD_ADMIN'):
|
||||
urlpatterns.append(url(r'^admin/auth/user/\d+/password/$', handler404))
|
||||
urlpatterns.append(url(r'^admin/password_change/$', handler404))
|
||||
urlpatterns.append(url(r'^admin/auth/user/\d+/password/$', handler404))
|
||||
urlpatterns.append(url(r'^admin/', admin.site.urls))
|
||||
|
||||
# enable entrance exams
|
||||
|
||||
Reference in New Issue
Block a user