dev_trainings
daiao 6 years ago
parent 41e897150b
commit 0669dcf907

@ -83,6 +83,9 @@ module Mobile
end
def memo_authenticate!
Rails.logger.info("#######current_user: ###{current_user}")
Rails.logger.info("#######session: ###{session[:user_id]}")
pass = (request.path.match(/memos\/\d+/).present? && !request.path.include?("reply")) ||
request.path.include?("get_memos_list") ||
request.path.include?("memos?page=") || request.path.match(/memos$/).present?
@ -94,6 +97,8 @@ module Mobile
end
def discusses_authenticate!
Rails.logger.info("#######current_user: ###{current_user}")
Rails.logger.info("#######session: ###{session[:user_id]}")
pass = request.path.match(/discusses$/).present? || request.path.include?("discusses?page=")
unless pass
error!('401 Unauthorized', 401) unless current_user

@ -24,7 +24,8 @@
<%= javascript_include_tag '/editormd/lib/marked.min.js', '/editormd/lib/prettify.min.js', '/editormd/lib/raphael.min.js', '/editormd/lib/underscore.min.js', '/editormd/lib/sequence-diagram.min.js',
'/editormd/lib/flowchart.min.js', '/editormd/lib/jquery.flowchart.min.js', '/editormd/editormd.js' %>
<%= yield :header_tags -%>
<% Rails.logger.info("########----current_user: #{User.current.id}") %>
<% Rails.logger.info("########----session: #{session[:user_id]}") %>
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Loading…
Cancel
Save