We installed gitorious on a system where we have several other rails
apps running and I've got it running in a mongrel+apache setup with
mod_proxy.

The problem we're running into is that we run the app as 
http://host.example.com/git/
- We've found is that there are certain times when gitorious redirects
the user back to /, which ends up being some other site rather than
the app.

I've gone through the code and found a few instances where this
happens - mostly in session_controller, users_controller and
merge_requests_controller.  Would it be possible to change this to be
a configurable value via gitorious.yml?  I didn't want to post a patch
because I'm not sure if there are other instances yet where gitorious
assumes that it's running out of '/' on the site - I only really did
this to the obvious instances and then added a 'gitorious_url' to the
gitorious.yml file.

If those really are the *only* places, I can submit the patches up -
wasn't sure on the name of the config variable either but I couldn't
think of anything better to call it. :)  Maybe gitorious_urlroot

ie -

diff --git a/app/controllers/users_controller.rb b/app/controllers/
users_controller.rb
index 329928b..bed3092 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -88,7 +88,7 @@ class UsersController < ApplicationController
     else
       flash[:error] = I18n.t "users_controller.activate_error"
     end
-    redirect_back_or_default('/')
+    redirect_back_or_default(GitoriousConfig['gitorious_url'])
   end

   def forgot_password
@@ -182,7 +182,7 @@ class UsersController < ApplicationController
         session.delete(k)
       end
       self.current_user = @user
-      redirect_back_or_default '/'
+      redirect_back_or_default(GitoriousConfig['gitorious_url'])
     else
       render :action => 'openid_build'
     end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Gitorious" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gitorious?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to