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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user