parlement 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +709 -0
- data/COPYING +223 -0
- data/README +20 -0
- data/Rakefile +136 -0
- data/app/controllers/account_controller.rb +181 -0
- data/app/controllers/application.rb +30 -0
- data/app/controllers/elt_controller.rb +83 -0
- data/app/helpers/account_helper.rb +2 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/elt_helper.rb +37 -0
- data/app/helpers/live_tree.rb +238 -0
- data/app/helpers/mailman.rb +96 -0
- data/app/models/attachment.rb +4 -0
- data/app/models/elt.rb +17 -0
- data/app/models/mail.rb +4 -0
- data/app/models/notifier.rb +13 -0
- data/app/models/person.rb +9 -0
- data/app/models/user.rb +7 -0
- data/app/models/user_notify.rb +75 -0
- data/app/views/account/_help.rhtml +23 -0
- data/app/views/account/_login.rhtml +57 -0
- data/app/views/account/_show.rhtml +31 -0
- data/app/views/account/logout.rhtml +10 -0
- data/app/views/account/signup.rhtml +17 -0
- data/app/views/account/welcome.rhtml +13 -0
- data/app/views/elt/_elt.rhtml +105 -0
- data/app/views/elt/_form.rhtml +31 -0
- data/app/views/elt/_list.rhtml +28 -0
- data/app/views/elt/new.rhtml +102 -0
- data/app/views/elt/rss.rxml +31 -0
- data/app/views/elt/show.rhtml +46 -0
- data/app/views/elt/show_tree.rhtml +8 -0
- data/app/views/layouts/scaffold.rhtml +13 -0
- data/app/views/layouts/top.rhtml +45 -0
- data/app/views/notifier/changeEmail.rhtml +10 -0
- data/config/boot.rb +17 -0
- data/config/database.yml +82 -0
- data/config/environment.rb +92 -0
- data/config/environments/development.rb +17 -0
- data/config/environments/production.rb +17 -0
- data/config/environments/test.rb +17 -0
- data/config/environments/user_environment.rb +1 -0
- data/config/routes.rb +28 -0
- data/db/ROOT/CV.txt +166 -0
- data/db/ROOT/IP.txt +3 -0
- data/db/ROOT/parleR.txt +3 -0
- data/db/ROOT/parlement/security.txt +34 -0
- data/db/ROOT/parlement/test.txt +4 -0
- data/db/ROOT/parlement.txt +51 -0
- data/db/ROOT/perso.txt +215 -0
- data/db/schema.sql +127 -0
- data/lib/data_import.rb +54 -0
- data/lib/file_column.rb +263 -0
- data/lib/file_column_helper.rb +45 -0
- data/lib/localization.rb +88 -0
- data/lib/localizer.rb +88 -0
- data/lib/login_system.rb +87 -0
- data/lib/rails_file_column.rb +19 -0
- data/lib/user_system.rb +101 -0
- data/public/404.html +8 -0
- data/public/500.html +8 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +24 -0
- data/public/dispatch.rb +10 -0
- data/public/engine_files/README +5 -0
- data/public/engine_files/login_engine/stylesheets/login_engine.css +81 -0
- data/public/favicon.ico +0 -0
- data/public/favicon.png +0 -0
- data/public/images/live_tree_branch_collapsed_icon.gif +0 -0
- data/public/images/live_tree_branch_expanded_icon.gif +0 -0
- data/public/images/live_tree_leaf_icon.gif +0 -0
- data/public/images/live_tree_loading_spinner.gif +0 -0
- data/public/images/webfeed.gif +0 -0
- data/public/javascripts/controls.js +721 -0
- data/public/javascripts/dragdrop.js +519 -0
- data/public/javascripts/effects.js +992 -0
- data/public/javascripts/live_tree.js +749 -0
- data/public/javascripts/prototype.js +1726 -0
- data/public/javascripts/scriptaculous.js +47 -0
- data/public/javascripts/slider.js +258 -0
- data/public/oldREADME +190 -0
- data/public/oldindex.html +78 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/default.css +238 -0
- data/public/stylesheets/live_tree.css +62 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/script/about +3 -0
- data/script/benchmarker +19 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/create_db +7 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/plugin +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/process/spinner +3 -0
- data/script/profiler +34 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/test/fixtures/attachments.yml +10 -0
- data/test/fixtures/elts.yml +15 -0
- data/test/fixtures/mails.yml +7 -0
- data/test/fixtures/people.yml +49 -0
- data/test/fixtures/users.yml +41 -0
- data/test/functional/account_controller_test.rb +239 -0
- data/test/functional/elt_controller_test.rb +18 -0
- data/test/mocks/test/time.rb +17 -0
- data/test/mocks/test/user_notify.rb +16 -0
- data/test/test_helper.rb +28 -0
- data/test/unit/attachment_test.rb +14 -0
- data/test/unit/elt_test.rb +14 -0
- data/test/unit/mail_test.rb +14 -0
- data/test/unit/notifier_test.rb +31 -0
- data/test/unit/person_test.rb +24 -0
- data/test/unit/user_test.rb +94 -0
- data/vendor/plugins/engines/CHANGELOG +7 -0
- data/vendor/plugins/engines/README +128 -0
- data/vendor/plugins/engines/init.rb +33 -0
- data/vendor/plugins/engines/lib/action_mailer_extensions.rb +160 -0
- data/vendor/plugins/engines/lib/action_view_extensions.rb +130 -0
- data/vendor/plugins/engines/lib/dependencies_extensions.rb +56 -0
- data/vendor/plugins/engines/lib/engines.rb +292 -0
- data/vendor/plugins/engines/lib/ruby_extensions.rb +127 -0
- data/vendor/plugins/engines/lib/testing_extensions.rb +33 -0
- data/vendor/plugins/engines/test/ruby_extensions_test.rb +94 -0
- data/vendor/plugins/login_engine/README +258 -0
- data/vendor/plugins/login_engine/app/controllers/user_controller.rb +248 -0
- data/vendor/plugins/login_engine/app/helpers/user_helper.rb +88 -0
- data/vendor/plugins/login_engine/app/models/user.rb +7 -0
- data/vendor/plugins/login_engine/app/models/user_notify.rb +75 -0
- data/vendor/plugins/login_engine/app/views/user/_edit.rhtml +11 -0
- data/vendor/plugins/login_engine/app/views/user/_password.rhtml +9 -0
- data/vendor/plugins/login_engine/app/views/user/change_password.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user/edit.rhtml +23 -0
- data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +18 -0
- data/vendor/plugins/login_engine/app/views/user/home.rhtml +7 -0
- data/vendor/plugins/login_engine/app/views/user/login.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user/logout.rhtml +8 -0
- data/vendor/plugins/login_engine/app/views/user/signup.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user_notify/change_password.rhtml +10 -0
- data/vendor/plugins/login_engine/app/views/user_notify/delete.rhtml +5 -0
- data/vendor/plugins/login_engine/app/views/user_notify/forgot_password.rhtml +11 -0
- data/vendor/plugins/login_engine/app/views/user_notify/pending_delete.rhtml +9 -0
- data/vendor/plugins/login_engine/app/views/user_notify/signup.rhtml +12 -0
- data/vendor/plugins/login_engine/db/schema.rb +25 -0
- data/vendor/plugins/login_engine/init_engine.rb +10 -0
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +107 -0
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +149 -0
- data/vendor/plugins/login_engine/lib/login_engine.rb +58 -0
- data/vendor/plugins/login_engine/public/stylesheets/login_engine.css +81 -0
- data/vendor/plugins/login_engine/tasks/tasks.rake +4 -0
- data/vendor/plugins/login_engine/test/fixtures/templates/users.yml +41 -0
- data/vendor/plugins/login_engine/test/fixtures/users.yml +41 -0
- data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +533 -0
- data/vendor/plugins/login_engine/test/mocks/mail.rb +14 -0
- data/vendor/plugins/login_engine/test/mocks/time.rb +19 -0
- data/vendor/plugins/login_engine/test/test_helper.rb +15 -0
- data/vendor/plugins/login_engine/test/unit/user_test.rb +94 -0
- metadata +276 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
module LoginEngine
|
|
2
|
+
module AuthenticatedSystem
|
|
3
|
+
|
|
4
|
+
protected
|
|
5
|
+
|
|
6
|
+
# overwrite this if you want to restrict access to only a few actions
|
|
7
|
+
# or if you want to check if the user has the correct rights
|
|
8
|
+
# example:
|
|
9
|
+
#
|
|
10
|
+
# # only allow nonbobs
|
|
11
|
+
# def authorize?(user)
|
|
12
|
+
# user.login != "bob"
|
|
13
|
+
# end
|
|
14
|
+
def authorize?(user)
|
|
15
|
+
true
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# overwrite this method if you only want to protect certain actions of the controller
|
|
19
|
+
# example:
|
|
20
|
+
#
|
|
21
|
+
# # don't protect the login and the about method
|
|
22
|
+
# def protect?(action)
|
|
23
|
+
# if ['action', 'about'].include?(action)
|
|
24
|
+
# return false
|
|
25
|
+
# else
|
|
26
|
+
# return true
|
|
27
|
+
# end
|
|
28
|
+
# end
|
|
29
|
+
def protect?(action)
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# login_required filter. add
|
|
34
|
+
#
|
|
35
|
+
# before_filter :login_required
|
|
36
|
+
#
|
|
37
|
+
# if the controller should be under any rights management.
|
|
38
|
+
# for finer access control you can overwrite
|
|
39
|
+
#
|
|
40
|
+
# def authorize?(user)
|
|
41
|
+
#
|
|
42
|
+
def login_required
|
|
43
|
+
if not protect?(action_name)
|
|
44
|
+
return true
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
if user? and authorize?(session[:user])
|
|
48
|
+
return true
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# store current location so that we can
|
|
52
|
+
# come back after the user logged in
|
|
53
|
+
store_location
|
|
54
|
+
|
|
55
|
+
# call overwriteable reaction to unauthorized access
|
|
56
|
+
access_denied
|
|
57
|
+
return false
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# overwrite if you want to have special behavior in case the user is not authorized
|
|
61
|
+
# to access the current operation.
|
|
62
|
+
# the default action is to redirect to the login screen
|
|
63
|
+
# example use :
|
|
64
|
+
# a popup window might just close itself for instance
|
|
65
|
+
def access_denied
|
|
66
|
+
redirect_to :controller => "/user", :action => "login"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# store current uri in the session.
|
|
70
|
+
# we can return to this location by calling return_location
|
|
71
|
+
def store_location
|
|
72
|
+
session['return-to'] = request.request_uri
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# move to the last store_location call or to the passed default one
|
|
76
|
+
def redirect_back_or_default(default)
|
|
77
|
+
if session['return-to'].nil?
|
|
78
|
+
redirect_to default
|
|
79
|
+
else
|
|
80
|
+
redirect_to_url session['return-to']
|
|
81
|
+
session['return-to'] = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def user?
|
|
86
|
+
# First, is the user already authenticated?
|
|
87
|
+
return true if not session[:user].nil?
|
|
88
|
+
|
|
89
|
+
# If not, is the user being authenticated by a token?
|
|
90
|
+
return false if not params[:user]
|
|
91
|
+
id = params[:user][:id]
|
|
92
|
+
key = params[:key]
|
|
93
|
+
if id and key
|
|
94
|
+
session[:user] = User.authenticate_by_token(id, key)
|
|
95
|
+
return true if not session[:user].nil?
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Everything failed
|
|
99
|
+
return false
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Returns the current user from the session, if any exists
|
|
103
|
+
def current_user
|
|
104
|
+
session[:user]
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
require 'digest/sha1'
|
|
2
|
+
|
|
3
|
+
# this model expects a certain database layout and its based on the name/login pattern.
|
|
4
|
+
|
|
5
|
+
module LoginEngine
|
|
6
|
+
module AuthenticatedUser
|
|
7
|
+
|
|
8
|
+
def self.included(base)
|
|
9
|
+
base.class_eval do
|
|
10
|
+
|
|
11
|
+
# use the table name given
|
|
12
|
+
set_table_name LoginEngine.config(:user_table)
|
|
13
|
+
|
|
14
|
+
attr_accessor :new_password
|
|
15
|
+
|
|
16
|
+
validates_presence_of :login, :on => :create
|
|
17
|
+
validates_length_of :login, :within => 3..40, :on => :create
|
|
18
|
+
validates_uniqueness_of :login, :on => :create
|
|
19
|
+
validates_uniqueness_of :email, :on => :create
|
|
20
|
+
|
|
21
|
+
validates_presence_of :password, :if => :validate_password?
|
|
22
|
+
validates_confirmation_of :password, :if => :validate_password?
|
|
23
|
+
validates_length_of :password, { :minimum => 5, :if => :validate_password? }
|
|
24
|
+
validates_length_of :password, { :maximum => 40, :if => :validate_password? }
|
|
25
|
+
|
|
26
|
+
protected
|
|
27
|
+
|
|
28
|
+
attr_accessor :password, :password_confirmation
|
|
29
|
+
|
|
30
|
+
after_save '@new_password = false'
|
|
31
|
+
after_validation :crypt_password
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
base.extend(ClassMethods)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
module ClassMethods
|
|
38
|
+
|
|
39
|
+
def authenticate(login, pass)
|
|
40
|
+
u = find_first(["login = ? AND verified = 1 AND deleted = 0", login])
|
|
41
|
+
return nil if u.nil?
|
|
42
|
+
find_first(["login = ? AND salted_password = ? AND verified = 1", login, AuthenticatedUser.salted_password(u.salt, AuthenticatedUser.hashed(pass))])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def authenticate_by_token(id, token)
|
|
46
|
+
# Allow logins for deleted accounts, but only via this method (and
|
|
47
|
+
# not the regular authenticate call)
|
|
48
|
+
u = find_first(["id = ? AND security_token = ?", id, token])
|
|
49
|
+
return nil if u.nil? or u.token_expired?
|
|
50
|
+
return nil if false == u.update_expiry
|
|
51
|
+
u
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
protected
|
|
58
|
+
|
|
59
|
+
def self.hashed(str)
|
|
60
|
+
# check if a salt has been set...
|
|
61
|
+
if LoginEngine.config(:salt) == nil
|
|
62
|
+
raise "You must define a :salt value in the configuration for the LoginEngine module."
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
return Digest::SHA1.hexdigest("#{LoginEngine.config(:salt)}--#{str}--}")[0..39]
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def self.salted_password(salt, hashed_password)
|
|
69
|
+
hashed(salt + hashed_password)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
public
|
|
73
|
+
|
|
74
|
+
# hmmm, how does this interact with the developer's own User model initialize?
|
|
75
|
+
# We would have to *insist* that the User.initialize method called 'super'
|
|
76
|
+
#
|
|
77
|
+
def initialize(attributes = nil)
|
|
78
|
+
super
|
|
79
|
+
@new_password = false
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def token_expired?
|
|
83
|
+
self.security_token and self.token_expiry and (Time.now > self.token_expiry)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def update_expiry
|
|
87
|
+
write_attribute('token_expiry', [self.token_expiry, Time.at(Time.now.to_i + 600 * 1000)].min)
|
|
88
|
+
write_attribute('authenticated_by_token', true)
|
|
89
|
+
write_attribute("verified", 1)
|
|
90
|
+
update_without_callbacks
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def generate_security_token(hours = nil)
|
|
94
|
+
if not hours.nil? or self.security_token.nil? or self.token_expiry.nil? or
|
|
95
|
+
(Time.now.to_i + token_lifetime / 2) >= self.token_expiry.to_i
|
|
96
|
+
return new_security_token(hours)
|
|
97
|
+
else
|
|
98
|
+
return self.security_token
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def set_delete_after
|
|
103
|
+
hours = LoginEngine.config(:delayed_delete_days) * 24
|
|
104
|
+
write_attribute('deleted', 1)
|
|
105
|
+
write_attribute('delete_after', Time.at(Time.now.to_i + hours * 60 * 60))
|
|
106
|
+
|
|
107
|
+
# Generate and return a token here, so that it expires at
|
|
108
|
+
# the same time that the account deletion takes effect.
|
|
109
|
+
return generate_security_token(hours)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def change_password(pass, confirm = nil)
|
|
113
|
+
self.password = pass
|
|
114
|
+
self.password_confirmation = confirm.nil? ? pass : confirm
|
|
115
|
+
@new_password = true
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
protected
|
|
119
|
+
|
|
120
|
+
def validate_password?
|
|
121
|
+
@new_password
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def crypt_password
|
|
126
|
+
if @new_password
|
|
127
|
+
write_attribute("salt", AuthenticatedUser.hashed("salt-#{Time.now}"))
|
|
128
|
+
write_attribute("salted_password", AuthenticatedUser.salted_password(salt, AuthenticatedUser.hashed(@password)))
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def new_security_token(hours = nil)
|
|
133
|
+
write_attribute('security_token', AuthenticatedUser.hashed(self.salted_password + Time.now.to_i.to_s + rand.to_s))
|
|
134
|
+
write_attribute('token_expiry', Time.at(Time.now.to_i + token_lifetime(hours)))
|
|
135
|
+
update_without_callbacks
|
|
136
|
+
return self.security_token
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def token_lifetime(hours = nil)
|
|
140
|
+
if hours.nil?
|
|
141
|
+
LoginEngine.config(:security_token_life_hours) * 60 * 60
|
|
142
|
+
else
|
|
143
|
+
hours * 60 * 60
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
require 'login_engine/authenticated_user'
|
|
2
|
+
require 'login_engine/authenticated_system'
|
|
3
|
+
|
|
4
|
+
module LoginEngine
|
|
5
|
+
include AuthenticatedSystem # re-include the helper module
|
|
6
|
+
|
|
7
|
+
#--
|
|
8
|
+
# Define the configuration values. config sets the value of the
|
|
9
|
+
# constant ONLY if it has not already been set, i.e. by the user in
|
|
10
|
+
# environment.rb
|
|
11
|
+
#++
|
|
12
|
+
|
|
13
|
+
# Source address for user emails
|
|
14
|
+
config :email_from, 'lazyatom@lazyatom.com'
|
|
15
|
+
|
|
16
|
+
# Destination email for system errors
|
|
17
|
+
config :admin_email, 'lazyatom@lazyatom.com'
|
|
18
|
+
|
|
19
|
+
# Sent in emails to users
|
|
20
|
+
config :app_url, 'http://localhost:3000/'
|
|
21
|
+
|
|
22
|
+
# Sent in emails to users
|
|
23
|
+
config :app_name, 'TestApp'
|
|
24
|
+
|
|
25
|
+
# Email charset
|
|
26
|
+
config :mail_charset, 'utf-8'
|
|
27
|
+
|
|
28
|
+
# Security token lifetime in hours
|
|
29
|
+
config :security_token_life_hours, 24
|
|
30
|
+
|
|
31
|
+
# Two column form input
|
|
32
|
+
config :TwoColumnInput, true
|
|
33
|
+
|
|
34
|
+
# Add all changeable user fields to this array.
|
|
35
|
+
# They will then be able to be edited from the edit action. You
|
|
36
|
+
# should NOT include the email field in this array.
|
|
37
|
+
config :changeable_fields, [ 'firstname', 'lastname' ]
|
|
38
|
+
|
|
39
|
+
# Set to true to allow delayed deletes (i.e., delete of record
|
|
40
|
+
# doesn't happen immediately after user selects delete account,
|
|
41
|
+
# but rather after some expiration of time to allow this action
|
|
42
|
+
# to be reverted).
|
|
43
|
+
config :delayed_delete, false
|
|
44
|
+
|
|
45
|
+
# Default is one week
|
|
46
|
+
config :delayed_delete_days, 7
|
|
47
|
+
|
|
48
|
+
# the table to store user information in
|
|
49
|
+
if ActiveRecord::Base.pluralize_table_names
|
|
50
|
+
config :user_table, "users"
|
|
51
|
+
else
|
|
52
|
+
config :user_table, "user"
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# controls whether or not email is used
|
|
56
|
+
config :use_email_notification, true
|
|
57
|
+
|
|
58
|
+
end
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
This CSS file is basically the scaffold.css file, and is only
|
|
4
|
+
included here to demonstrate using CSS files with Engines.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
body { background-color: #fff; color: #333; }
|
|
9
|
+
|
|
10
|
+
body, p, ol, ul, td {
|
|
11
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
|
12
|
+
font-size: 13px;
|
|
13
|
+
line-height: 18px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
pre {
|
|
17
|
+
background-color: #eee;
|
|
18
|
+
padding: 10px;
|
|
19
|
+
font-size: 11px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
a { color: #000; }
|
|
23
|
+
a:visited { color: #666; }
|
|
24
|
+
a:hover { color: #fff; background-color:#000; }
|
|
25
|
+
|
|
26
|
+
.fieldWithErrors {
|
|
27
|
+
padding: 2px;
|
|
28
|
+
background-color: red;
|
|
29
|
+
display: table;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#ErrorExplanation {
|
|
33
|
+
width: 400px;
|
|
34
|
+
border: 2px solid red;
|
|
35
|
+
padding: 7px;
|
|
36
|
+
padding-bottom: 12px;
|
|
37
|
+
margin-bottom: 20px;
|
|
38
|
+
background-color: #f0f0f0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#ErrorExplanation h2 {
|
|
42
|
+
text-align: left;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
padding: 5px 5px 5px 15px;
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
margin: -7px;
|
|
47
|
+
background-color: #c00;
|
|
48
|
+
color: #fff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#ErrorExplanation p {
|
|
52
|
+
color: #333;
|
|
53
|
+
margin-bottom: 0;
|
|
54
|
+
padding: 5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#ErrorExplanation ul li {
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
list-style: square;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
div.uploadStatus {
|
|
63
|
+
margin: 5px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
div.progressBar {
|
|
67
|
+
margin: 5px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
div.progressBar div.border {
|
|
71
|
+
background-color: #fff;
|
|
72
|
+
border: 1px solid grey;
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
div.progressBar div.background {
|
|
77
|
+
background-color: #333;
|
|
78
|
+
height: 18px;
|
|
79
|
+
width: 0%;
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
|
+
|
|
3
|
+
bob:
|
|
4
|
+
id: 1000001
|
|
5
|
+
login: bob
|
|
6
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
7
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
8
|
+
email: bob@test.com
|
|
9
|
+
verified: 1
|
|
10
|
+
|
|
11
|
+
existingbob:
|
|
12
|
+
id: 1000002
|
|
13
|
+
login: existingbob
|
|
14
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
15
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
16
|
+
email: existingbob@test.com
|
|
17
|
+
verified: 1
|
|
18
|
+
|
|
19
|
+
longbob:
|
|
20
|
+
id: 1000003
|
|
21
|
+
login: longbob
|
|
22
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
23
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
24
|
+
email: longbob@test.com
|
|
25
|
+
verified: 1
|
|
26
|
+
|
|
27
|
+
deletebob1:
|
|
28
|
+
id: 1000004
|
|
29
|
+
login: deletebob1
|
|
30
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
31
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
32
|
+
email: deletebob1@test.com
|
|
33
|
+
verified: 1
|
|
34
|
+
|
|
35
|
+
deletebob2:
|
|
36
|
+
id: 1000005
|
|
37
|
+
login: deletebob2
|
|
38
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
39
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
40
|
+
email: deletebob2@test.com
|
|
41
|
+
verified: 1
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
|
+
|
|
3
|
+
bob:
|
|
4
|
+
id: 1000001
|
|
5
|
+
login: bob
|
|
6
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
7
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
8
|
+
email: bob@test.com
|
|
9
|
+
verified: 1
|
|
10
|
+
|
|
11
|
+
existingbob:
|
|
12
|
+
id: 1000002
|
|
13
|
+
login: existingbob
|
|
14
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
15
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
16
|
+
email: existingbob@test.com
|
|
17
|
+
verified: 1
|
|
18
|
+
|
|
19
|
+
longbob:
|
|
20
|
+
id: 1000003
|
|
21
|
+
login: longbob
|
|
22
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
23
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
24
|
+
email: longbob@test.com
|
|
25
|
+
verified: 1
|
|
26
|
+
|
|
27
|
+
deletebob1:
|
|
28
|
+
id: 1000004
|
|
29
|
+
login: deletebob1
|
|
30
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
31
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
32
|
+
email: deletebob1@test.com
|
|
33
|
+
verified: 1
|
|
34
|
+
|
|
35
|
+
deletebob2:
|
|
36
|
+
id: 1000005
|
|
37
|
+
login: deletebob2
|
|
38
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
39
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
40
|
+
email: deletebob2@test.com
|
|
41
|
+
verified: 1
|