Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 109
- Log:
Miscellaneous bug fixes. Breadcrumb trail while browsing SVN.
Hub integration - see also Changeset #107 and Changeset #108.
- Author:
- adh
- Date:
- Mon Oct 23 18:22:45 +0100 2006
- Size:
- 1616 Bytes
1 | require_dependency "login_system" |
2 | |
3 | class ApplicationController < ActionController::Base |
4 | |
5 | # Hub single sign-on support. |
6 | |
7 | require 'hub_sso_lib' |
8 | include HubSsoLib::Core |
9 | before_filter :hubssolib_update_state |
10 | |
11 | # Now Collaboa's own administrative login system. |
12 | |
13 | include LoginSystem |
14 | |
15 | before_filter :set_headers, :sync_with_repos, :user_obj_required |
16 | after_filter :remember_location |
17 | |
18 | def url_for_svn_path(fullpath, rev=nil) |
19 | path_parts = fullpath.split('/').reject {|fp| fp.empty?} |
20 | path_url = {:controller => 'repository', :action => 'browse', :path => path_parts} |
21 | if rev |
22 | url = path_url.merge({:rev => rev}) |
23 | else |
24 | url = path_url |
25 | end |
26 | url_for(url) |
27 | end |
28 | helper_method :url_for_svn_path |
29 | |
30 | def current_user |
31 | @current_user |
32 | end |
33 | helper_method :current_user |
34 | |
35 | def rescue_action_in_public(exception) |
36 | @exception = exception |
37 | render 'rescues/error' |
38 | end |
39 | |
40 | private |
41 | # Sets the headers for each request |
42 | def set_headers |
43 | @headers['Content-Type'] = "text/html; charset=utf-8" |
44 | end |
45 | |
46 | # Remember where we are. |
47 | # Never return to one of these controllers: |
48 | @@remember_not = ['feed', 'login', 'user'] |
49 | def remember_location |
50 | if @response.headers['Status'] == '200 OK' |
51 | session['return_to'] = request.request_uri unless @@remember_not.include? controller_name |
52 | end |
53 | end |
54 | |
55 | def sync_with_repos |
56 | Changeset.sync_changesets |
57 | end |
58 | |
59 | def user_obj_required |
60 | if not session[:user_id] |
61 | @current_user = User.find_by_login 'Public' |
62 | else |
63 | @current_user = User.find session[:user_id] |
64 | end |
65 | end |
66 | |
67 | end |