summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-10-07 21:03:28 +0200
committerhukl <contact@smyck.org>2009-10-07 21:03:28 +0200
commit9dadc61cae2c4c01a97880e89ca86a0e760fc8d1 (patch)
tree4c50bccc0339429d669a04e5dc3f2e735dfcb515 /app/models
parenta57fb0c2084885c35b7ba89917c37696e5df3b3f (diff)
implemented complete restful user management interface including functional tests. this enables basic user operation. note that only admins are allowed to create, edit, destroy other users
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 26ebf45..035a145 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -21,7 +21,7 @@ class User < ActiveRecord::Base
21 validates_format_of :email, :with => Authentication.email_regex, 21 validates_format_of :email, :with => Authentication.email_regex,
22 :message => Authentication.bad_email_message 22 :message => Authentication.bad_email_message
23 23
24 attr_accessible :login, :email, :password, :password_confirmation 24 attr_accessible :login, :email, :password, :password_confirmation, :admin
25 25
26 # Authenticates a user by their login name and unencrypted password. Returns the user or nil. 26 # Authenticates a user by their login name and unencrypted password. Returns the user or nil.
27 def self.authenticate(login, password) 27 def self.authenticate(login, password)