Commit 95a39b2d5b9880d8a03e62aab6ab4311fcbcb8e1

Authored by Karpikau Andrei
1 parent a1fab1a6

change kanjai version

@@ -47,8 +47,8 @@ @@ -47,8 +47,8 @@
47 <file leaf-file-name="pages_controller.rb" pinned="false" current-in-tab="false"> 47 <file leaf-file-name="pages_controller.rb" pinned="false" current-in-tab="false">
48 <entry file="file://$PROJECT_DIR$/app/controllers/kanjai/pages_controller.rb"> 48 <entry file="file://$PROJECT_DIR$/app/controllers/kanjai/pages_controller.rb">
49 <provider selected="true" editor-type-id="text-editor"> 49 <provider selected="true" editor-type-id="text-editor">
50 - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2235">  
51 - <caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" /> 50 + <state vertical-scroll-proportion="0.0" vertical-offset="1316" max-vertical-offset="2370">
  51 + <caret line="122" column="15" selection-start-line="122" selection-start-column="15" selection-end-line="122" selection-end-column="15" />
52 <folding /> 52 <folding />
53 </state> 53 </state>
54 </provider> 54 </provider>
@@ -542,7 +542,7 @@ @@ -542,7 +542,7 @@
542 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 542 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
543 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 543 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
544 <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 544 <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
545 - <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27786753" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> 545 + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27786753" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
546 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> 546 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
547 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32930514" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> 547 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32930514" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
548 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 548 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
@@ -938,8 +938,8 @@ @@ -938,8 +938,8 @@
938 </entry> 938 </entry>
939 <entry file="file://$PROJECT_DIR$/app/controllers/kanjai/pages_controller.rb"> 939 <entry file="file://$PROJECT_DIR$/app/controllers/kanjai/pages_controller.rb">
940 <provider selected="true" editor-type-id="text-editor"> 940 <provider selected="true" editor-type-id="text-editor">
941 - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="2235">  
942 - <caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" /> 941 + <state vertical-scroll-proportion="0.0" vertical-offset="1316" max-vertical-offset="2370">
  942 + <caret line="122" column="15" selection-start-line="122" selection-start-column="15" selection-end-line="122" selection-end-column="15" />
943 <folding /> 943 <folding />
944 </state> 944 </state>
945 </provider> 945 </provider>
1 PATH 1 PATH
2 remote: . 2 remote: .
3 specs: 3 specs:
4 - kanjai (0.0.29) 4 + kanjai (0.0.31)
5 acts_as_list 5 acts_as_list
6 acts_as_tree 6 acts_as_tree
7 aws-sdk 7 aws-sdk
@@ -46,6 +46,11 @@ module Kanjai @@ -46,6 +46,11 @@ module Kanjai
46 46
47 def setTemplateContent(page_template, layer, page_data) 47 def setTemplateContent(page_template, layer, page_data)
48 48
  49 + unless current_admin_user
  50 + layer.gsub!('<meta name="csrf-param" content="###CSRF_PARAM###"/>', '')
  51 + layer.gsub!('<meta name="csrf-token" content="###CSRF_TOKEN###"/>', '')
  52 + end
  53 +
49 layer.scan(/(<element name="([\w\W]+?)" type="([\w\W]+?)"><\/element>)/).each do |item| 54 layer.scan(/(<element name="([\w\W]+?)" type="([\w\W]+?)"><\/element>)/).each do |item|
50 content = item[0] 55 content = item[0]
51 name = item[1] 56 name = item[1]
@@ -109,9 +114,13 @@ module Kanjai @@ -109,9 +114,13 @@ module Kanjai
109 end 114 end
110 layer.gsub!(marker, content) 115 layer.gsub!(marker, content)
111 when '###CSRF_PARAM###' 116 when '###CSRF_PARAM###'
112 - layer.gsub!(marker, Rack::Utils.escape_html(request_forgery_protection_token)) 117 + unless current_admin_user
  118 + layer.gsub!(marker, Rack::Utils.escape_html(request_forgery_protection_token))
  119 + end
113 when '###CSRF_TOKEN###' 120 when '###CSRF_TOKEN###'
114 - layer.gsub!(marker, Rack::Utils.escape_html(form_authenticity_token)) 121 + unless current_admin_user
  122 + layer.gsub!(marker, Rack::Utils.escape_html(form_authenticity_token))
  123 + end
115 when '###DOMAIN_NAME###' 124 when '###DOMAIN_NAME###'
116 layer.gsub!(marker, $scheme + ADMIN_CONFIG['domain_name']) 125 layer.gsub!(marker, $scheme + ADMIN_CONFIG['domain_name'])
117 when '###INCLUDE_JS_FILE###' 126 when '###INCLUDE_JS_FILE###'
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.31" 2 + VERSION = "0.0.32"
3 end 3 end