alchemy_cms 4.0.0.beta → 4.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -7
- data/CHANGELOG.md +23 -0
- data/README.md +1 -1
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +2 -2
- data/app/assets/stylesheets/alchemy/_extends.scss +3 -5
- data/app/assets/stylesheets/alchemy/_mixins.scss +1 -1
- data/app/assets/stylesheets/alchemy/base.scss +2 -2
- data/app/assets/stylesheets/alchemy/buttons.scss +2 -2
- data/app/assets/stylesheets/alchemy/dialogs.scss +3 -3
- data/app/assets/stylesheets/alchemy/elements.scss +2 -2
- data/app/assets/stylesheets/alchemy/image_library.scss +10 -10
- data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +2 -2
- data/app/assets/stylesheets/alchemy/lists.scss +2 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +1 -16
- data/app/assets/stylesheets/alchemy/tables.scss +1 -1
- data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +4 -4
- data/app/controllers/alchemy/admin/attachments_controller.rb +10 -10
- data/app/controllers/alchemy/admin/base_controller.rb +10 -19
- data/app/controllers/alchemy/admin/clipboard_controller.rb +20 -7
- data/app/controllers/alchemy/admin/contents_controller.rb +5 -19
- data/app/controllers/alchemy/admin/dashboard_controller.rb +5 -3
- data/app/controllers/alchemy/admin/elements_controller.rb +7 -1
- data/app/controllers/alchemy/admin/essence_files_controller.rb +2 -2
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +8 -13
- data/app/controllers/alchemy/admin/languages_controller.rb +2 -0
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +2 -0
- data/app/controllers/alchemy/admin/legacy_page_urls_controller.rb +2 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +3 -1
- data/app/controllers/alchemy/admin/pictures_controller.rb +11 -9
- data/app/controllers/alchemy/admin/resources_controller.rb +25 -4
- data/app/controllers/alchemy/admin/sites_controller.rb +2 -0
- data/app/controllers/alchemy/admin/tags_controller.rb +2 -0
- data/app/controllers/alchemy/admin/trash_controller.rb +2 -0
- data/app/controllers/alchemy/api/base_controller.rb +2 -0
- data/app/controllers/alchemy/api/contents_controller.rb +2 -0
- data/app/controllers/alchemy/api/elements_controller.rb +2 -0
- data/app/controllers/alchemy/api/pages_controller.rb +2 -0
- data/app/controllers/alchemy/attachments_controller.rb +2 -0
- data/app/controllers/alchemy/base_controller.rb +3 -1
- data/app/controllers/alchemy/elements_controller.rb +2 -0
- data/app/controllers/alchemy/messages_controller.rb +2 -0
- data/app/controllers/alchemy/pages_controller.rb +11 -2
- data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +2 -0
- data/app/controllers/concerns/alchemy/legacy_page_redirects.rb +2 -0
- data/app/controllers/concerns/alchemy/locale_redirects.rb +2 -0
- data/app/controllers/concerns/alchemy/page_redirects.rb +2 -0
- data/app/controllers/concerns/alchemy/site_redirects.rb +2 -0
- data/app/helpers/alchemy/admin/attachments_helper.rb +2 -0
- data/app/helpers/alchemy/admin/base_helper.rb +2 -28
- data/app/helpers/alchemy/admin/contents_helper.rb +2 -0
- data/app/helpers/alchemy/admin/elements_helper.rb +2 -0
- data/app/helpers/alchemy/admin/essences_helper.rb +2 -0
- data/app/helpers/alchemy/admin/form_helper.rb +2 -0
- data/app/helpers/alchemy/admin/navigation_helper.rb +2 -0
- data/app/helpers/alchemy/admin/pages_helper.rb +2 -0
- data/app/helpers/alchemy/admin/pictures_helper.rb +2 -0
- data/app/helpers/alchemy/admin/tags_helper.rb +24 -76
- data/app/helpers/alchemy/base_helper.rb +2 -0
- data/app/helpers/alchemy/deprecated_pages_helper.rb +2 -0
- data/app/helpers/alchemy/elements_block_helper.rb +2 -0
- data/app/helpers/alchemy/elements_helper.rb +2 -0
- data/app/helpers/alchemy/essences_helper.rb +2 -0
- data/app/helpers/alchemy/pages_helper.rb +2 -0
- data/app/helpers/alchemy/url_helper.rb +2 -0
- data/app/mailers/alchemy/base_mailer.rb +2 -0
- data/app/mailers/alchemy/messages_mailer.rb +2 -0
- data/app/models/alchemy.rb +2 -0
- data/app/models/alchemy/attachment.rb +6 -4
- data/app/models/alchemy/cell.rb +4 -2
- data/app/models/alchemy/content.rb +7 -5
- data/app/models/alchemy/content/factory.rb +7 -7
- data/app/models/alchemy/element.rb +21 -28
- data/app/models/alchemy/element/definitions.rb +4 -2
- data/app/models/alchemy/element/element_contents.rb +3 -1
- data/app/models/alchemy/element/element_essences.rb +2 -0
- data/app/models/alchemy/element/presenters.rb +2 -0
- data/app/models/alchemy/element_to_page.rb +2 -0
- data/app/models/alchemy/essence_boolean.rb +2 -0
- data/app/models/alchemy/essence_date.rb +2 -0
- data/app/models/alchemy/essence_file.rb +2 -0
- data/app/models/alchemy/essence_html.rb +2 -0
- data/app/models/alchemy/essence_link.rb +6 -4
- data/app/models/alchemy/essence_picture.rb +13 -11
- data/app/models/alchemy/essence_picture_view.rb +2 -0
- data/app/models/alchemy/essence_richtext.rb +2 -0
- data/app/models/alchemy/essence_select.rb +3 -1
- data/app/models/alchemy/essence_text.rb +6 -4
- data/app/models/alchemy/folded_page.rb +4 -2
- data/app/models/alchemy/language.rb +9 -6
- data/app/models/alchemy/language/code.rb +2 -0
- data/app/models/alchemy/legacy_page_url.rb +3 -1
- data/app/models/alchemy/message.rb +2 -0
- data/app/models/alchemy/page.rb +3 -2
- data/app/models/alchemy/page/fixed_attributes.rb +2 -0
- data/app/models/alchemy/page/page_cells.rb +2 -0
- data/app/models/alchemy/page/page_elements.rb +3 -1
- data/app/models/alchemy/page/page_naming.rb +2 -0
- data/app/models/alchemy/page/page_natures.rb +2 -1
- data/app/models/alchemy/page/page_scopes.rb +2 -0
- data/app/models/alchemy/page/page_users.rb +2 -0
- data/app/models/alchemy/picture.rb +2 -0
- data/app/models/alchemy/picture/transformations.rb +2 -0
- data/app/models/alchemy/picture/url.rb +2 -0
- data/app/models/alchemy/site.rb +4 -2
- data/app/models/alchemy/site/layout.rb +2 -0
- data/app/models/alchemy/tag.rb +5 -2
- data/app/models/alchemy/tree_node.rb +2 -0
- data/app/serializers/alchemy/attachment_serializer.rb +2 -0
- data/app/serializers/alchemy/base_serializer.rb +2 -0
- data/app/serializers/alchemy/cell_serializer.rb +2 -0
- data/app/serializers/alchemy/content_serializer.rb +2 -0
- data/app/serializers/alchemy/element_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_boolean_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_date_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_file_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_html_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_link_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_picture_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_richtext_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_select_serializer.rb +2 -0
- data/app/serializers/alchemy/essence_text_serializer.rb +2 -0
- data/app/serializers/alchemy/legacy_element_serializer.rb +2 -0
- data/app/serializers/alchemy/page_serializer.rb +2 -0
- data/app/serializers/alchemy/page_tree_serializer.rb +2 -0
- data/app/serializers/alchemy/picture_serializer.rb +2 -0
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +1 -1
- data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +1 -3
- data/app/views/alchemy/admin/attachments/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/contents/_missing.html.erb +1 -1
- data/app/views/alchemy/admin/contents/create.js.erb +9 -13
- data/app/views/alchemy/admin/contents/new.html.erb +1 -1
- data/app/views/alchemy/admin/elements/_picture_gallery_editor.html.erb +4 -4
- data/app/views/alchemy/admin/essence_files/assign.js.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/assign.js.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +10 -7
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +8 -6
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +1 -1
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +2 -2
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +4 -4
- data/app/views/alchemy/admin/pictures/_filter_bar.html.erb +1 -3
- data/app/views/alchemy/admin/pictures/_overlay_picture_list.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +1 -3
- data/app/views/alchemy/admin/resources/_tag_list.html.erb +1 -1
- data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +2 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +2 -2
- data/app/views/alchemy/essences/shared/_essence_picture_tools.html.erb +3 -3
- data/app/views/alchemy/navigation/_renderer.html.erb +1 -2
- data/config/brakeman.ignore +65 -0
- data/db/migrate/20130827094554_alchemy_two_point_six.rb +1 -1
- data/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +1 -1
- data/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +1 -1
- data/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +1 -1
- data/db/migrate/20150608204610_add_parent_element_id_to_alchemy_elements.rb +1 -1
- data/db/migrate/20150729151825_add_link_text_to_alchemy_essence_files.rb +1 -1
- data/db/migrate/20150906195818_add_locale_to_alchemy_languages.rb +1 -1
- data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +1 -1
- data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +1 -1
- data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +1 -1
- data/db/migrate/20160912223112_add_index_to_alchemy_pages_rgt.rb +1 -1
- data/db/migrate/20160927205604_add_foreign_key_indices_and_null_constraints.rb +1 -1
- data/db/migrate/20160928080104_add_foreign_keys.rb +1 -1
- data/lib/alchemy/ability_helper.rb +2 -0
- data/lib/alchemy/admin/locale.rb +2 -0
- data/lib/alchemy/auth_accessors.rb +2 -0
- data/lib/alchemy/cache_digests/template_tracker.rb +2 -0
- data/lib/alchemy/config.rb +2 -0
- data/lib/alchemy/configuration_methods.rb +2 -0
- data/lib/alchemy/controller_actions.rb +2 -0
- data/lib/alchemy/deprecation.rb +3 -0
- data/lib/alchemy/errors.rb +2 -0
- data/lib/alchemy/essence.rb +2 -0
- data/lib/alchemy/filetypes.rb +2 -0
- data/lib/alchemy/forms/builder.rb +2 -0
- data/lib/alchemy/hints.rb +2 -0
- data/lib/alchemy/i18n.rb +2 -0
- data/lib/alchemy/logger.rb +2 -0
- data/lib/alchemy/modules.rb +2 -0
- data/lib/alchemy/name_conversions.rb +2 -0
- data/lib/alchemy/on_page_layout.rb +2 -0
- data/lib/alchemy/on_page_layout/callbacks_runner.rb +2 -0
- data/lib/alchemy/page_layout.rb +3 -1
- data/lib/alchemy/paths.rb +2 -0
- data/lib/alchemy/permissions.rb +2 -0
- data/lib/alchemy/picture_attributes.rb +2 -0
- data/lib/alchemy/resource.rb +2 -0
- data/lib/alchemy/resources_helper.rb +14 -12
- data/lib/alchemy/routing_constraints.rb +2 -0
- data/lib/alchemy/ssl_protection.rb +2 -0
- data/lib/alchemy/test_support/controller_requests.rb +20 -0
- data/lib/alchemy/test_support/essence_shared_examples.rb +3 -21
- data/lib/alchemy/tinymce.rb +2 -0
- data/lib/alchemy/touching.rb +2 -0
- data/lib/alchemy/upgrader/three_point_four.rb +20 -3
- data/lib/alchemy/userstamp.rb +2 -0
- data/lib/alchemy/version.rb +3 -1
- data/lib/alchemy_cms.rb +1 -0
- data/lib/tasks/alchemy/upgrade.rake +5 -1
- metadata +7 -5
@@ -1,5 +1,3 @@
|
|
1
|
-
<% params_to_keep = [:size, :tagged_with, :query, :element_id, :options, :content_id, :_] %>
|
2
|
-
|
3
1
|
<div id="filter_bar">
|
4
2
|
<h2><%= Alchemy.t('Filter') %></h2>
|
5
3
|
<%= select_tag(
|
@@ -19,7 +17,7 @@
|
|
19
17
|
$(function() {
|
20
18
|
$('#picture_filter').on('change', function(e) {
|
21
19
|
var $this = $(this);
|
22
|
-
var url = '<%= alchemy.admin_pictures_path(
|
20
|
+
var url = '<%= alchemy.admin_pictures_path(search_filter_params.except(:filter).to_h) %>';
|
23
21
|
if ($this.data('remote') === true) {
|
24
22
|
$.get(url, {filter: $this.val()}, null, 'script');
|
25
23
|
} else {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="picture_thumbnail assign_image_list_detail <%= size.blank? ? 'medium' : size %>" name="<%= picture_to_assign.name %>" id="picture_to_assign_<%= picture_to_assign.id %>">
|
2
|
-
<% action_url = create_or_assign_url(picture_to_assign,
|
2
|
+
<% action_url = create_or_assign_url(picture_to_assign, options) %>
|
3
3
|
<%= link_to(
|
4
4
|
image_tag(
|
5
5
|
picture_to_assign.url(size: preview_size(size), flatten: true),
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% if params[:tagged_with].present? %>
|
8
8
|
<%= link_to(
|
9
9
|
render_icon('delete-small') + Alchemy.t('Remove tag filter'),
|
10
|
-
url_for(
|
10
|
+
url_for(search_filter_params.except(:tagged_with)),
|
11
11
|
remote: request.xhr?,
|
12
12
|
class: 'button small with_icon please_wait'
|
13
13
|
) %>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
<% params_to_keep = [:tagged_with, :q] %>
|
2
|
-
|
3
1
|
<div id="filter_bar">
|
4
2
|
<h2><%= Alchemy.t('Filter') %></h2>
|
5
3
|
<%= select_tag(
|
@@ -17,7 +15,7 @@
|
|
17
15
|
$(function() {
|
18
16
|
$('#resource_filter').on('change', function(e) {
|
19
17
|
var $this = $(this);
|
20
|
-
var url = '<%= resources_path(resource_handler.namespaced_resources_name,
|
18
|
+
var url = '<%= resources_path(resource_handler.namespaced_resources_name, search_filter_params.except(:filter).to_h) %>';
|
21
19
|
if ($this.data('remote') === true) {
|
22
20
|
$.get(url, {filter: $this.val()}, null, 'script');
|
23
21
|
} else {
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<% if params[:tagged_with].present? %>
|
8
8
|
<%= link_to(
|
9
9
|
render_icon('delete-small') + Alchemy.t('Remove tag filter'),
|
10
|
-
url_for(
|
10
|
+
url_for(search_filter_params.except(:tagged_with)),
|
11
11
|
remote: request.xhr?,
|
12
12
|
class: 'button small with_icon please_wait'
|
13
13
|
) %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<%= f.file_field file_attribute,
|
3
3
|
class: 'fileupload fileupload--field', multiple: true,
|
4
4
|
name: "#{f.object_name}[#{file_attribute}]" %>
|
5
|
-
<%= hidden_field_tag
|
5
|
+
<%= hidden_field_tag("#{f.object_name}[upload_hash]", Time.current.hash) if object.respond_to?(:upload_hash) %>
|
6
6
|
<%= f.label file_attribute, data: {alchemy_hotkey: 'alt+n'} do %>
|
7
7
|
<div class="button_with_label">
|
8
8
|
<span class="icon_button"><%= render_icon :upload %></span>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
content_id: content.id,
|
4
4
|
only: content.settings_value(:only, local_assigns.fetch(:options, {})),
|
5
5
|
except: content.settings_value(:except, local_assigns.fetch(:options, {})),
|
6
|
-
options: local_assigns.fetch(:options, {})
|
6
|
+
options: local_assigns.fetch(:options, {})
|
7
7
|
),
|
8
8
|
{
|
9
9
|
title: Alchemy.t(:assign_file),
|
@@ -35,7 +35,7 @@
|
|
35
35
|
<%= link_to_dialog '',
|
36
36
|
alchemy.edit_admin_essence_file_path(
|
37
37
|
id: content.essence.id,
|
38
|
-
options: local_assigns.fetch(:options, {})
|
38
|
+
options: local_assigns.fetch(:options, {})
|
39
39
|
),
|
40
40
|
{
|
41
41
|
title: Alchemy.t(:edit_file_properties),
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= content_tag :div, id: content.dom_id, data: {"content-id" => content.id}, class: [
|
2
2
|
"essence_picture_editor",
|
3
|
-
options[:
|
3
|
+
options[:sortable] ? "draggable_picture" : nil,
|
4
4
|
options[:grouped] ? nil : "content_editor"
|
5
5
|
].compact.join(" ") do %>
|
6
6
|
<% unless options[:grouped] %><%= content_label(content) %><% end %>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<% end %>
|
19
19
|
</span>
|
20
20
|
<%- if content.ingredient -%>
|
21
|
-
<div class="picture_handle" title="<%= Alchemy.t(:drag_to_sort) if options[:
|
21
|
+
<div class="picture_handle" title="<%= Alchemy.t(:drag_to_sort) if options[:sortable] %>"></div>
|
22
22
|
<%- end -%>
|
23
23
|
<div class="picture_image">
|
24
24
|
<div class="thumbnail_background<%= ' missing' if content.ingredient.nil? %>">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= link_to_dialog render_icon('crop'),
|
5
5
|
alchemy.crop_admin_essence_picture_path(
|
6
6
|
content.essence,
|
7
|
-
options: content.settings.update(options)
|
7
|
+
options: content.settings.update(options)
|
8
8
|
), {
|
9
9
|
size: "1000x615",
|
10
10
|
title: Alchemy.t('Edit Picturemask'),
|
@@ -20,7 +20,7 @@
|
|
20
20
|
element_id: content.element,
|
21
21
|
content_id: content.id,
|
22
22
|
swap: true,
|
23
|
-
options: options
|
23
|
+
options: options
|
24
24
|
),
|
25
25
|
{
|
26
26
|
title: (content.ingredient ? Alchemy.t(:swap_image) : Alchemy.t(:insert_image)),
|
@@ -47,7 +47,7 @@
|
|
47
47
|
alchemy.edit_admin_essence_picture_path(
|
48
48
|
id: content.essence.id,
|
49
49
|
content_id: content.id,
|
50
|
-
options: options
|
50
|
+
options: options
|
51
51
|
), {
|
52
52
|
title: Alchemy.t(:edit_image_properties),
|
53
53
|
size: edit_picture_dialog_size(content, options)
|
@@ -1,8 +1,7 @@
|
|
1
1
|
<% if pages.present? %>
|
2
2
|
<%= content_tag(
|
3
3
|
'ul',
|
4
|
-
|
5
|
-
:id => html_options[:id]
|
4
|
+
html_options.reverse_merge(class: "navigation level_#{pages.first.level - 1}")
|
6
5
|
) do %>
|
7
6
|
<% pages.each do |page| %>
|
8
7
|
<% position = 'first' if page == pages.first %>
|
@@ -0,0 +1,65 @@
|
|
1
|
+
{
|
2
|
+
"ignored_warnings": [
|
3
|
+
{
|
4
|
+
"warning_type": "Mass Assignment",
|
5
|
+
"warning_code": 70,
|
6
|
+
"fingerprint": "1dd8f69d9b1bdd4017212f38098f03d2ecb2db06269fb940090f209eee7570c6",
|
7
|
+
"check_name": "MassAssignment",
|
8
|
+
"message": "Parameters should be whitelisted for mass assignment",
|
9
|
+
"file": "app/controllers/alchemy/admin/resources_controller.rb",
|
10
|
+
"line": 128,
|
11
|
+
"link": "http://brakemanscanner.org/docs/warning_types/mass_assignment/",
|
12
|
+
"code": "params.require(resource_handler.namespaced_resource_name).permit!",
|
13
|
+
"render_path": null,
|
14
|
+
"location": {
|
15
|
+
"type": "method",
|
16
|
+
"class": "Alchemy::Admin::ResourcesController",
|
17
|
+
"method": "resource_params"
|
18
|
+
},
|
19
|
+
"user_input": null,
|
20
|
+
"confidence": "Medium",
|
21
|
+
"note": "Because we actually can't know all attributes each inheriting controller supports, we permit all resource model params. It is adviced that all inheriting controllers implement this method and provide its own set of permitted attributes. As this all happens inside the password protected /admin namespace this can be considered a false positive."
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"warning_type": "Dynamic Render Path",
|
25
|
+
"warning_code": 15,
|
26
|
+
"fingerprint": "26461414e9f6be7b68dd8c7dda1c69b09c92a8e9997c0ac204e1756cae7f3d68",
|
27
|
+
"check_name": "Render",
|
28
|
+
"message": "Render path contains parameter value",
|
29
|
+
"file": "app/views/alchemy/admin/contents/create.js.erb",
|
30
|
+
"line": 1,
|
31
|
+
"link": "http://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
|
32
|
+
"code": "render(action => \"alchemy/essences/#{Content.create_from_scratch(Element.find(params[:content][:element_id]), content_params).essence_partial_name}_editor\", { :content => Content.create_from_scratch(Element.find(params[:content][:element_id]), content_params), :options => options_from_params.symbolize_keys, :html_options => (params[:html_options] or {}).symbolize_keys })",
|
33
|
+
"render_path": [{"type":"controller","class":"Alchemy::Admin::ContentsController","method":"create","line":21,"file":"app/controllers/alchemy/admin/contents_controller.rb"}],
|
34
|
+
"location": {
|
35
|
+
"type": "template",
|
36
|
+
"template": "alchemy/admin/contents/create"
|
37
|
+
},
|
38
|
+
"user_input": "params[:content][:element_id]",
|
39
|
+
"confidence": "Weak",
|
40
|
+
"note": "This dynamic render path comes from the Contents essence not from any params or user mutated string. This can safely be ignored."
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"warning_type": "Mass Assignment",
|
44
|
+
"warning_code": 70,
|
45
|
+
"fingerprint": "4b4dc24a6f5251bc1a6851597dfcee39608a2932eb7f81a4a241c00fca8a3043",
|
46
|
+
"check_name": "MassAssignment",
|
47
|
+
"message": "Parameters should be whitelisted for mass assignment",
|
48
|
+
"file": "app/controllers/alchemy/admin/elements_controller.rb",
|
49
|
+
"line": 168,
|
50
|
+
"link": "http://brakemanscanner.org/docs/warning_types/mass_assignment/",
|
51
|
+
"code": "params.fetch(:contents, {}).permit!",
|
52
|
+
"render_path": null,
|
53
|
+
"location": {
|
54
|
+
"type": "method",
|
55
|
+
"class": "Alchemy::Admin::ElementsController",
|
56
|
+
"method": "contents_params"
|
57
|
+
},
|
58
|
+
"user_input": null,
|
59
|
+
"confidence": "Medium",
|
60
|
+
"note": "`Alchemy::Content` is a polymorphic association of any kind of model extending `Alchemy::Essence`. Since we can't know the attributes of all potential essences we need to permit all attributes. As this all happens inside the password protected /admin namespace this can be considered a false positive."
|
61
|
+
}
|
62
|
+
],
|
63
|
+
"updated": "2017-08-16 15:07:26 +0200",
|
64
|
+
"brakeman_version": "3.7.0"
|
65
|
+
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
# In order to upgrade from an old version of Alchemy, you have to run all migrations from
|
6
6
|
# each version you missed up to the version you want to upgrade to, before running this migration.
|
7
7
|
#
|
8
|
-
class AlchemyTwoPointSix < ActiveRecord::Migration
|
8
|
+
class AlchemyTwoPointSix < ActiveRecord::Migration[4.2]
|
9
9
|
def up
|
10
10
|
unless table_exists?('alchemy_attachments')
|
11
11
|
create_table "alchemy_attachments" do |t|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddParentElementIdToAlchemyElements < ActiveRecord::Migration
|
1
|
+
class AddParentElementIdToAlchemyElements < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
add_column :alchemy_elements, :parent_element_id, :integer
|
4
4
|
add_index :alchemy_elements, [:page_id, :parent_element_id]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration
|
1
|
+
class AddForeignKeyIndicesAndNullConstraints < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
change_column_null :alchemy_cells, :page_id, false, 0
|
4
4
|
change_column_null :alchemy_contents, :element_id, false, 0
|
data/lib/alchemy/admin/locale.rb
CHANGED
data/lib/alchemy/config.rb
CHANGED
data/lib/alchemy/errors.rb
CHANGED
data/lib/alchemy/essence.rb
CHANGED
data/lib/alchemy/filetypes.rb
CHANGED
data/lib/alchemy/hints.rb
CHANGED
data/lib/alchemy/i18n.rb
CHANGED
data/lib/alchemy/logger.rb
CHANGED
data/lib/alchemy/modules.rb
CHANGED
data/lib/alchemy/page_layout.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Alchemy
|
2
4
|
class PageLayout
|
3
5
|
class << self
|
@@ -157,7 +159,7 @@ module Alchemy
|
|
157
159
|
#
|
158
160
|
def read_definitions_file
|
159
161
|
if File.exist?(layouts_file_path)
|
160
|
-
YAML.safe_load(ERB.new(File.read(layouts_file_path)).result, [Date], [], true) || []
|
162
|
+
YAML.safe_load(ERB.new(File.read(layouts_file_path)).result, [Date, Symbol], [], true) || []
|
161
163
|
else
|
162
164
|
raise LoadError, "Could not find page_layouts.yml file! Please run `rails generate alchemy:scaffold`"
|
163
165
|
end
|