Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 114
- Log:
Updated for use with HubSsoLib 0.1.0 (Changeset #113). Some stylesheet
improvements.
- Author:
- adh
- Date:
- Fri Oct 27 15:59:50 +0100 2006
- Size:
- 1651 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_beforehand |
10 | after_filter :hubssolib_afterwards |
11 | |
12 | # Now Collaboa's own administrative login system. |
13 | |
14 | include LoginSystem |
15 | |
16 | before_filter :set_headers, :sync_with_repos, :user_obj_required |
17 | after_filter :remember_location |
18 | |
19 | def url_for_svn_path(fullpath, rev=nil) |
20 | path_parts = fullpath.split('/').reject {|fp| fp.empty?} |
21 | path_url = {:controller => 'repository', :action => 'browse', :path => path_parts} |
22 | if rev |
23 | url = path_url.merge({:rev => rev}) |
24 | else |
25 | url = path_url |
26 | end |
27 | url_for(url) |
28 | end |
29 | helper_method :url_for_svn_path |
30 | |
31 | def current_user |
32 | @current_user |
33 | end |
34 | helper_method :current_user |
35 | |
36 | def rescue_action_in_public(exception) |
37 | @exception = exception |
38 | render 'rescues/error' |
39 | end |
40 | |
41 | private |
42 | # Sets the headers for each request |
43 | def set_headers |
44 | @headers['Content-Type'] = "text/html; charset=utf-8" |
45 | end |
46 | |
47 | # Remember where we are. |
48 | # Never return to one of these controllers: |
49 | @@remember_not = ['feed', 'login', 'user'] |
50 | def remember_location |
51 | if @response.headers['Status'] == '200 OK' |
52 | session['return_to'] = request.request_uri unless @@remember_not.include? controller_name |
53 | end |
54 | end |
55 | |
56 | def sync_with_repos |
57 | Changeset.sync_changesets |
58 | end |
59 | |
60 | def user_obj_required |
61 | if not session[:user_id] |
62 | @current_user = User.find_by_login 'Public' |
63 | else |
64 | @current_user = User.find session[:user_id] |
65 | end |
66 | end |
67 | |
68 | end |