|
|
|
@ -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
|
|
|
|
|