From d28e29765635244671503ec3362c04f4240e2003 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 10 Jan 2011 17:52:26 -0500 Subject: [PATCH] prep for newid server --- app/views/layouts/application.html.haml | 1 + lib/openneo-auth.rb | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 5c72a987..ba21389f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -34,6 +34,7 @@ %span == Hey, #{link_to current_user.name, user_contributions_path(current_user)}! == You have #{current_user.points} points. + = link_to 'Settings', Openneo::Auth.remote_settings_url = link_to 'Log out', logout_path_with_return_to - else = link_to login_path_with_return_to, :id => 'userbar-log-in' do diff --git a/lib/openneo-auth.rb b/lib/openneo-auth.rb index 7ef1e338..2599def2 100644 --- a/lib/openneo-auth.rb +++ b/lib/openneo-auth.rb @@ -43,7 +43,8 @@ module Openneo query = { :app => config.app, :session_id => session[:session_id], - :path => params[:return_to] || '/' + :path => params[:return_to] || '/', + :from => params[:from] }.to_query uri = URI::HTTP.build({ :host => config.auth_server, @@ -52,6 +53,13 @@ module Openneo }) uri.to_s end + + def remote_settings_url + URI::HTTP.build({ + :host => config.auth_server, + :path => '/users/edit' + }).to_s + end end end end