Deactivate ckeditor file uploads feature

This feature was not working so its better to disable it completely.

By removing attachment_files endpoints related buttons and tabs from ckeditor UI are not shown to users anymore.
This commit is contained in:
Senén Rodero Rodríguez
2020-04-17 20:03:54 +02:00
parent 526d161e2d
commit 7466148408
2 changed files with 11 additions and 4 deletions

View File

@@ -8,13 +8,9 @@ CKEDITOR.editorConfig = function( config )
config.forcePasteAsPlainText = true;
config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
config.filebrowserUploadMethod = "form";
config.allowedContent = true;

View File

@@ -30,4 +30,15 @@ describe "CKEditor" do
expect(page).to have_css "img[src$='clippy.jpg']"
end
scenario "cannot upload attachments through link tab", :js do
login_as(create(:administrator).user)
visit new_admin_site_customization_page_path
find(".cke_button__link").click
expect(page).to have_css(".cke_dialog")
expect(page).not_to have_link "Upload"
expect(page).not_to have_link "Browse Server"
end
end