diff --git a/ee/app/views/admin/appearances/_system_header_footer_form.html.haml b/ee/app/views/admin/appearances/_system_header_footer_form.html.haml index 3605d63b3d5345b0d4fdf38fe42ffc41abc8eebc..86e726423e87578d8f6b74729d347792c8c30564 100644 --- a/ee/app/views/admin/appearances/_system_header_footer_form.html.haml +++ b/ee/app/views/admin/appearances/_system_header_footer_form.html.haml @@ -1,4 +1,4 @@ -- return unless License.feature_available?(:system_header_footer_form) +- return unless License.feature_available?(:system_header_footer) - form = local_assigns.fetch(:form) diff --git a/ee/changelogs/unreleased/7255-unable-to-see-system-header-footer-in-admin-dashboard.yml b/ee/changelogs/unreleased/7255-unable-to-see-system-header-footer-in-admin-dashboard.yml new file mode 100644 index 0000000000000000000000000000000000000000..0464db975ce5b6dca6b0ed093242f6a78483e846 --- /dev/null +++ b/ee/changelogs/unreleased/7255-unable-to-see-system-header-footer-in-admin-dashboard.yml @@ -0,0 +1,5 @@ +--- +title: Fixes bug that prevented a user from seeing the system header and footer settings on the admin dashboard +merge_request: 6926 +author: +type: fixed diff --git a/spec/features/admin/admin_appearance_spec.rb b/spec/features/admin/admin_appearance_spec.rb index 3c2ae5b3c6a268aeb949ea9de4b5a24957bd4107..9c358489a0aa93b0ffe6e6e4cf1853dd2db8026e 100644 --- a/spec/features/admin/admin_appearance_spec.rb +++ b/spec/features/admin/admin_appearance_spec.rb @@ -39,6 +39,31 @@ expect_custom_new_project_appearance(appearance) end + context 'Custom system header and footer' do + before do + appearance.update(header_message: "Foo", footer_message: "Bar") + sign_in(create(:admin)) + end + + it 'shows custom system header and footer when licensed' do + stub_licensed_features(system_header_footer: true) + + visit admin_appearances_path + + expect(page).to have_content appearance.header_message + expect(page).to have_content appearance.footer_message + end + + it 'does not show custom system header and footer when unlicensed' do + stub_licensed_features(system_header_footer: false) + + visit admin_appearances_path + + expect(page).not_to have_content appearance.header_message + expect(page).not_to have_content appearance.footer_message + end + end + it 'Custom sign-in page' do visit new_user_session_path