fixed issue that others might end up having with sso_key
This commit is contained in:
parent
a8d173ff1d
commit
db3a4b66ad
3 changed files with 1 additions and 50 deletions
|
@ -1,47 +0,0 @@
|
|||
class SessionsController < ApplicationController
|
||||
|
||||
before_filter :require_no_user, only: [:new, :create]
|
||||
before_filter :require_user, only: [:destroy]
|
||||
|
||||
respond_to :html, :json
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
# GET /session/new
|
||||
def new
|
||||
@session = Session.new
|
||||
|
||||
|
||||
respond_with(@session)
|
||||
end
|
||||
|
||||
# POST /session
|
||||
def create
|
||||
@session = Session.create(params[:session])
|
||||
|
||||
@user = User.new
|
||||
|
||||
@topic = Topic.exists?(260)
|
||||
|
||||
if @topic
|
||||
respond_with(@user, @session, location: topic_url(260)) do |format|
|
||||
end
|
||||
else
|
||||
respond_with(@user, @session, location: root_url) do |format|
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /session
|
||||
def destroy
|
||||
@session = Session.find
|
||||
@session.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { respond_with(@session, location: restore(default: root_path)) }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
|
@ -1,2 +0,0 @@
|
|||
module SessionsHelper
|
||||
end
|
|
@ -89,7 +89,7 @@
|
|||
Metamaps.Loading.loader.show(); // Hidden by default
|
||||
|
||||
// set up uservoice with signed in user
|
||||
<% if authenticated? %>
|
||||
<% if authenticated? && ENV['SSO_KEY'] %>
|
||||
USERVOICE.load(Metamaps.Active.Mapper.name, Metamaps.Active.Mapper.id, "<%= user.email %>", "<%= current_sso_token %>");
|
||||
<% else %>
|
||||
USERVOICE.load();
|
||||
|
|
Loading…
Reference in a new issue