Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1067 Bytes
1 | class Admin::WelcomeController < ApplicationController |
2 | no_login_required |
3 | skip_before_filter :verify_authenticity_token |
4 | |
5 | def index |
6 | redirect_to admin_pages_url |
7 | end |
8 | |
9 | def login |
10 | if request.post? |
11 | @username_or_email = params[:username_or_email] |
12 | password = params[:password] |
13 | announce_invalid_user unless self.current_user = User.authenticate(@username_or_email, password) |
14 | end |
15 | if current_user |
16 | if params[:remember_me] |
17 | current_user.remember_me |
18 | set_session_cookie |
19 | end |
20 | redirect_to (session[:return_to] || welcome_url) |
21 | session[:return_to] = nil |
22 | end |
23 | end |
24 | |
25 | def logout |
26 | cookies[:session_token] = { :expires => 1.day.ago } |
27 | self.current_user.forget_me if self.current_user |
28 | self.current_user = nil |
29 | announce_logged_out |
30 | redirect_to login_url |
31 | end |
32 | |
33 | private |
34 | |
35 | def announce_logged_out |
36 | flash[:notice] = t('welcome_controller.logged_out') |
37 | end |
38 | |
39 | def announce_invalid_user |
40 | flash.now[:error] = t('welcome_controller.invalid_user') |
41 | end |
42 | |
43 | end |