Commit graph

65 commits

Author SHA1 Message Date
Dan Rice
7f1246f42f Make User.projects.actionize deterministic
Add project.id to the comparison to ensure consistent order when
counts are identical.
2015-01-03 18:12:11 -05:00
Dan Rice
ea0d40060a Remove support for deprecated password-hashing algorithm
* Remove all methods implementing and checking for the old algorithm
* Document a pre-upgrade step to check for remaining obsolete passwords
* Remove config.salt
2014-11-15 10:28:29 -05:00
Reinier Balt
18b7a467c1 fix #1400 where deleting a user will clean up tags and dependencies too 2014-09-23 16:35:45 +02:00
Matt Rogers
aa41e20e46 Remove trailing whitespace and tabs 2014-08-14 21:05:05 -05:00
Dan Rice
622291d98d Purge UserTime from app/* 2014-06-12 21:24:31 -04:00
Reinier Balt
2430fcb906 fix failing tests
not sure if the to_a fixes to get collections from activerecord is the right way
2014-05-16 14:33:18 +02:00
Mindaugas Mozūras
a97848f0ba Refactor negative blank? into present? 2013-09-13 15:19:25 +03:00
Matt Rogers
96777c2e3a Replace User#time with UserTime#time 2013-07-30 16:21:04 -05:00
Matt Rogers
8512e8db3b rename DateUtils to UserTime 2013-07-29 21:51:15 -05:00
Matt Rogers
a1aaa283f1 Remove User#at_midnight
Replace it with a class called DateUtils with a method called
`#midnight_for` that takes a preference instance and date to convert to
midnight.
2013-07-29 16:34:23 -05:00
Reinier Balt
671f64b419 move to strong_parameters of rails4. 2013-05-27 12:44:31 +02:00
Reinier Balt
54b106d96b remove use of .all on model 2013-05-13 12:33:01 +02:00
Reinier Balt
ebff4cfc0c start fixing deprecation warnings 2013-05-11 23:13:32 +02:00
Reinier Balt
bf3a1e653a increate test coverage for user and project model 2013-03-01 16:22:29 +01:00
Reinier Balt
ef91dd0c64 another set of dynamic finder migrations. All non-cucumber tests pass 2013-02-27 11:50:49 +01:00
Dan Rice
5b6cbf566a Don't sort todos when counting them
Grouping isn't as lax in PostgreSQL as it is in MySQL or SQLite. All
sort fields also need to be in the GROUP BY, or be aggregated. The order
isn't relevant when counting, so simply don't order in that case.

Fix #1336
2012-10-04 10:43:22 -04:00
Reinier Balt
13b58f3a10 all unit and functional tests are passing 2012-04-30 13:56:40 +02:00
Reinier Balt
fd433d76d8 fix all upgrade warnings from the rails_upgrade plugin 2012-04-30 13:56:38 +02:00
Reinier Balt
fd4fb6df9e get all unit tests running again. Seems we have some pretty old code in there :-) 2012-04-30 13:56:37 +02:00
Reinier Balt
86afd42148 Work in progress: has_many_polymorphs does not work with rails 3.2 because of intrusive changes in rails internals. I think we need to rip out this dependency... 2012-04-30 13:56:34 +02:00
Stefan Richter
d03928ef4c making cryptography stuff in user public 2011-10-10 22:31:51 +02:00
Stefan Richter
08fb85ef0d fixing issues with user creation 2011-10-05 16:25:30 +02:00
Reinier Balt
eb26f4f7b9 fix error on end of each request at cleanup_application
declaring self.method caused rails to error

Signed-off-by: Reinier Balt <lrbalt@gmail.com>
2011-09-30 19:49:18 +02:00
Jan Stępień
342b8ab4ef Require 'bcrypt' on top of app/models/user.rb 2011-09-07 17:19:04 +02:00
Jan Stępień
e5708f5ce7 Authenticate users with deprecated SHA-1 passwords 2011-09-07 16:06:02 +02:00
Jan Stępień
8e23d11054 Added User.uses_deprecated_password? method 2011-09-07 16:06:02 +02:00
Jan Stępień
e7301608a6 Salting is unnecessary, BCrypt takes care of it
Source: http://en.wikipedia.org/w/index.php?title=Bcrypt&oldid=439692871
2011-09-07 16:06:02 +02:00
Jan Stępień
95f0f71441 Hash passwords with BCrypt instead of SHA1
BCrypt is regarded as a more secure alternative to hashing using message
digest algorithms, such as MD5 and SHA families [0, 1, 2]. Apart from
built-in salting it is adaptable to the increasing power of modern
processing units, which makes it more secure against brute-force cracking.

This commit makes all passwords hashed using BCrypt. The session tokens
remain generated using SHA1. Tests were updated, `rake test:units` and
`rake test:functionals` didn't report any regressions.

[0] http://bcrypt.sourceforge.net/
[1] http://en.wikipedia.org/w/index.php?title=Bcrypt&oldid=439692871
[2] eab1c72/README.md
2011-09-07 16:05:52 +02:00
Reinier Balt
8546ae5dfa fix test failures after the changes and refactorings 2011-07-09 17:19:12 +02:00
Reinier Balt
01057af684 start modifying done view and do some refactoring 2011-07-09 17:19:11 +02:00
Reinier Balt
0ccf42d08c fix #1157 and fix #1158 by changing the way empty projects are included in the sorting and by fixing the dutch translation for sorting titles 2011-04-29 23:17:17 +02:00
Stefan Richter
2c0cf2e457 fix bug with empty identity URL 2011-01-24 16:14:57 +08:00
Stefan Richter
5ac3f242bc fixing bug .. now tests pass 2011-01-24 16:14:56 +08:00
Stefan Richter
1c90b90909 fixing some stuff around OpenID:
- adding missing Javascript includes
	- fixing jquery for showing/hiding indentity url field
	- adding identity url field to signup form
	- fixing bug in signup controller
2011-01-24 16:14:56 +08:00
Marcus Ilgner
338d4bb5a6 Added locale selection to preferences
Mostly completed transition to full i18n
Incorporated german translations by Ulf Klose <ulf.klose@gmail.com>
2011-01-16 18:14:07 +01:00
Marcus Ilgner
fd3f69d927 Changed code to support basic i18n.
Added RubyMine configuration and rvm setup to .gitignore.
2010-11-09 16:31:26 +08:00
Erik Ordway
5b431ef50a This allows CAS to work side by side with other Auth methods.
This is at least one issue with this

to logout of CAS you need session information but the logout method blows this away so I do the cas log out before the session is killed so the session persistest in rails.  Because I needed to move the CAS before filters into login_cas and out of the application to make it work side by side.   The user will still be logined into tracks even though their CAS session is closed as the session will still be there.

 def logout
    @user.forget_me if logged_in?
    cookies.delete :auth_token
    session['user_id'] = nil
    if ( SITE_CONFIG['authentication_schemes'].include? 'cas')  && session[:cas_user]
      CASClient::Frameworks::Rails::Filter.logout(self)
    else
      reset_session
      notify :notice, "You have been logged out of Tracks."
      redirect_to_login
    end
  end

The other issue I have with this is that:
I could not find a use case for having mixed auth when using CAS. The reason to move to CAS is that all your users use CAS all the time. Even for admin accounts. Moodle is a good example of this in that when you activate CAS the default is that you can now only access moodle via CAS. By allowing mixed auth and self signup you end up with a anyone (the public) being able to sign up for accounts.
2010-01-12 17:17:56 -08:00
Erik Ordway
b85b3fc081 allow adding users and set new users has having cas as the auth type 2009-12-18 09:40:12 -05:00
Eric Allen
0e7c2a344c Normalize token, not URL
OpenID 2.0 supports tokens that aren't valid URLs
2009-12-07 18:43:34 -05:00
Henrik Bohre
b136816ff1 #300: Updated Project and User models to use the new Todo model 2009-11-04 22:31:54 -05:00
Eric Allen
acad0596be WIP: contexts page mostly working 2009-10-02 19:45:49 -04:00
Reinier Balt
b990f8a015 make project settings editable from the project page
We're using the edit form instead of several separate fields to edit settings
2009-04-18 23:50:12 +02:00
Reinier Balt
324838c1c4 fix some queries for mysql4 where NOT is interpreted more strict than in mysql5. Thanks Steven for finding this one out! 2009-02-08 20:38:27 +01:00
Reinier Balt
f79c28231b remove unused and unneccesary user_id from taggings table.
this way we can stay closer to the defaults of has_many_polymorphs thus making upgrading easier
2009-01-08 10:18:03 +01:00
Eric Allen
594ed4ca63 Don't re-generate remember token if we already have one. This should allow you to stay logged in on two devices at the same time. Closes #812. 2009-01-01 17:13:00 -05:00
Eric Allen
611a53e668 No point in changing the name of the OpenID identity column in users table. Use the existing one. 2008-12-08 18:51:33 -05:00
Eric Allen
930999829b Re-write OpenID code to use new authentication plugin. Tested to work! 2008-12-08 00:52:57 -05:00
Reinier Balt
539b4f96a1 add testcase for deleting a user. Resolves #734 2008-12-03 20:53:50 +01:00
Luke Melia
35ae5fc431 Next step in upgrading Tracks to Rails 2.2. Some highlights:
* Ran rake rails:update
* Added old actionwebservice framework
* Updated RSpec and RSpec-Rails
* Removed asset_packager plugin (not compatible, Scott no longer maintaining), and replaced with bundle_fu. See the bundle_fu README for more info.
* Hacks to UJS and ARTS plugins, which are no longer supported. Probably should move off both UJS and RJS.
* Hack to flashobject_helper plugin (upgrade to Rails 2.2-compatible version if/when it comes out.)
* Hack to skinny-spec plugin, for Rails 2.2 compatibility. Should check for official release.
* Hacks to resource_feeder plugin, for Rails 2.2 compatibility. Should check for official release (not likely) or move off it.
* Addressed some deprecation warnings. More to come.
* My mobile mime type hackery is no longer necessary with new Rails features. Yay!
* Updated environment.rb.tmpl with changes

TODO:
* Restore view specs marked pending
* Fix failing integration tests.
* Try selenium tests.
* Investigate OpenID support.
* Address deprecation warnings.
* Consider moving parts of environment.rb to initializers
* Address annoying config.gem warning about highline gem
2008-11-30 00:34:15 -05:00
Reinier Balt
e31b05a697 update query for Postgresql
exchanging double quote with single quote in sql. Thanks Walter
2008-10-28 22:39:50 +01:00