From 25b08981e57a11ad18f63d064788d5b3f44a1076 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 9 Nov 2017 13:57:19 -0500 Subject: [PATCH] Revert "Merge pull request #16447 from appsembler/omar/hide-library-button" This reverts commit 9a9ef198b2d654859cf406224e513f24b98ac0ff, reversing changes made to f61cbe75b50af55f722e24dd7de2a5337ef81fb4. --- cms/djangoapps/contentstore/views/library.py | 2 +- .../contentstore/views/tests/test_library.py | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/cms/djangoapps/contentstore/views/library.py b/cms/djangoapps/contentstore/views/library.py index 1d1667a268..bce8079f62 100644 --- a/cms/djangoapps/contentstore/views/library.py +++ b/cms/djangoapps/contentstore/views/library.py @@ -58,7 +58,7 @@ def get_library_creator_status(user): elif settings.FEATURES.get('ENABLE_CREATOR_GROUP', False): return get_course_creator_status(user) == 'granted' else: - return not settings.FEATURES.get('DISABLE_COURSE_CREATION', False) + return True @login_required diff --git a/cms/djangoapps/contentstore/views/tests/test_library.py b/cms/djangoapps/contentstore/views/tests/test_library.py index 5e83aea0f7..102d0778af 100644 --- a/cms/djangoapps/contentstore/views/tests/test_library.py +++ b/cms/djangoapps/contentstore/views/tests/test_library.py @@ -28,7 +28,6 @@ def make_url_for_lib(key): @ddt.ddt -@mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': False}) class UnitTestLibraries(CourseTestCase): """ Unit tests for library views @@ -64,15 +63,6 @@ class UnitTestLibraries(CourseTestCase): _, nostaff_user = self.create_non_staff_authed_user_client() self.assertEqual(get_library_creator_status(nostaff_user), True) - @mock.patch.dict('django.conf.settings.FEATURES', {'DISABLE_COURSE_CREATION': True}) - @mock.patch("contentstore.views.library.LIBRARIES_ENABLED", True) - def test_library_creator_status_with_no_course_creator_role_and_disabled_nonstaff_course_creation(self): - """ - Ensure that `DISABLE_COURSE_CREATION` feature works with libraries as well. - """ - _, nostaff_user = self.create_non_staff_authed_user_client() - self.assertFalse(get_library_creator_status(nostaff_user)) - @patch("contentstore.views.library.LIBRARIES_ENABLED", False) def test_with_libraries_disabled(self): """