Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 178
- Log:
Hub integration of Beast forum. Completed styling for RISC OS Open site.
Removed reliance on JavaScript. Added Textile hints to various views.
Added bespoke utility code used to port over RForum data for posterity;
note the rather large bug that it ignores the deleted flag on RForum
data.Some amount of testing carried out on Firefox, Opera and Netsurf. Looks
OK so far, but there are definitely some aesthetic kinks to work out
still and doubtless some operational bugs will surface once it goes
live and is subjected to more intensive real world use.
- Author:
- rool
- Date:
- Mon Mar 12 00:19:40 +0000 2007
- Size:
- 1351 Bytes
1 | class SessionsController < ApplicationController |
2 | |
3 | @@hubssolib_permissions = HubSsoLib::Permissions.new({ |
4 | :new => [ :admin ], |
5 | :create => [ :admin, :webmaster, :privileged, :normal ], |
6 | :edit => [ :admin ], |
7 | :update => [ :admin ], |
8 | :destroy => [ :admin ], |
9 | }) |
10 | |
11 | def SessionsController.hubssolib_permissions |
12 | @@hubssolib_permissions |
13 | end |
14 | |
15 | def create |
16 | self.current_user = User.authenticate(params[:login], params[:password]) |
17 | redirect_to home_path and return |
18 | |
19 | # Old pre-Hub code |
20 | |
21 | if logged_in? |
22 | cookies[:login_token]={ :value => "#{current_user.id};#{current_user.reset_login_key!}", :expires => Time.now.utc+1.year } if params[:remember_me]=="1" |
23 | redirect_to home_path and return |
24 | end |
25 | flash.now[:error] = "Invalid login or password, try again please." |
26 | flash.now[:error] = "Your account has not been activated. Use 'reset password' to be sent another activation e-mail." if User.authenticate(params[:login], params[:password], false) |
27 | render :action => 'new' |
28 | end |
29 | |
30 | def destroy |
31 | reset_session |
32 | cookies.delete :login_token |
33 | flash[:notice] = "You have been logged out." |
34 | redirect_to home_path |
35 | end |
36 | |
37 | end |