Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 146
- Log:
Now insists on being a Hub admin before allowing further access
to its own admin interface. Update to the breadcrumbs template
to alter views in line with recent RCVSweb changes - for details
see Changeset #144.
- Author:
- adh
- Date:
- Wed Nov 15 22:48:23 +0000 2006
- Size:
- 1144 Bytes
1 | class LoginController < ApplicationController |
2 | def index |
3 | redirect_to :action => 'login' |
4 | end |
5 | |
6 | # Insist on being a Hub admin before allowing further access |
7 | |
8 | @@hubssolib_permissions = HubSsoLib::Permissions.new({ |
9 | :login => [ :admin, :webmaster, :privileged, :normal ] |
10 | }) |
11 | |
12 | def LoginController.hubssolib_permissions |
13 | @@hubssolib_permissions |
14 | end |
15 | |
16 | def login |
17 | case request.method |
18 | when :post |
19 | if user = User.authenticate(params[:user_login], params[:user_password]) |
20 | # Reset the session properly to prevent a possible session fixation attack |
21 | return_to = session[:return_to] |
22 | reset_session |
23 | session[:user_id] = user.id |
24 | session[:return_to] = return_to if return_to |
25 | |
26 | flash[:notice] = "Login successful" |
27 | redirect_back_or_default :controller => 'admin', :action => 'index' |
28 | else |
29 | @login = params[:user_login] |
30 | @message = "Login unsuccessful" |
31 | end |
32 | end |
33 | end |
34 | |
35 | def logout |
36 | session[:user_id] = nil |
37 | @current_user = User.find_by_login 'Public' |
38 | end |
39 | |
40 | end |