aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
Commit message (Collapse)AuthorAgeLines
* Clean UserGareth Rees2014-10-29-80/+80
| | | | | | | | | Remove self. Use unless instead of if ! Use . instead of :: for class methods Remove explicit return Use each instead of for Use inline if
* Group User class methods at top of classGareth Rees2014-10-29-105/+104
| | | | https://github.com/bbatsov/ruby-style-guide#consistent-classes
* Group User macro methods at top of fileGareth Rees2014-10-29-12/+8
| | | | https://github.com/bbatsov/rails-style-guide#macro-style-methods
* Move User callbacks to top of fileGareth Rees2014-10-29-2/+3
| | | | | Really difficult to figure out what’s going on when a callback is buried halfway between a load of methods
* Rename XXX comments with TODO:Gareth Rees2014-06-10-3/+3
| | | | Picks these up in `rake notes` and adds semantic meaning
* Annotate modelsGareth Rees2014-04-09-19/+18
| | | | | Should have been run after related migrations. Could automate this to always run after migrations.
* Display batch requests for user on 'my requests' pageLouise Crow2013-12-04-0/+1
| | | | This is the most rudimentary possible way to give them access to the batch request urls, pending #1239
* Add InfoRequestBatch model.Louise Crow2013-12-04-0/+2
| | | | | Re-annotate models. Index InfoRequestBatches by user - we'll display the batches for a user when they view their own requests.
* Batch users don't have a daily limit.Louise Crow2013-12-04-0/+3
| | | | | | | It doesn't make logical sense that they would. However I am preserving the ability to make batch requests as a separate thing from not having a daily limit - I think batch sending requires a (perhaps marginally) bigger level of trust.
* Update the helpful model schema annotationsMark Longair2013-11-01-2/+0
| | | | These are regenerated with "bundle exec annotate"
* Rename method to make it a bit more genericLouise Crow2013-09-16-2/+2
| | | | A super user will be able to see all hidden things, not just requests.
* Re-annotate models with database fieldsLouise Crow2013-09-16-17/+18
|
* Split the string interpolation and translation into two steps so that the ↵Louise Crow2013-06-24-2/+5
| | | | translation gets picked up by rake gettext:find. Add a bit more explanation.
* Merge branch 'release/0.11'0.11.0.3Louise Crow2013-06-04-19/+22
|\
| * Mark ban text as html safeLouise Crow2013-04-25-1/+1
| |
| * Rename Configuration class to avoid conflict with ActiveSupport::ConfigurableHenare Degan2013-03-03-6/+6
| |
| * Merge branch 'develop' into rails-3-spikeHenare Degan2013-02-15-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile Gemfile.lock app/controllers/general_controller.rb app/controllers/track_controller.rb app/models/outgoing_message.rb app/models/public_body.rb app/models/user.rb app/views/general/frontpage.rhtml config/environment.rb config/initializers/inflections.rb config/initializers/mime_types.rb db/migrate/094_remove_old_tags_foreign_key.rb lib/timezone_fixes.rb spec/models/request_mailer_spec.rb spec/views/request/list.rhtml_spec.rb
| * \ Merge branch 'i18n_rails3_preparation' into rails-3-spikeMatthew Landauer2013-01-31-6/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/controllers/general_controller.rb app/controllers/public_body_controller.rb spec/controllers/public_body_controller_spec.rb
| | * | Small refactorMatthew Landauer2013-01-17-6/+1
| | | |
| * | | Errors#add_to_base(msg) has been deprecated, use Errors#add(:base, msg) insteadHenare Degan2012-12-12-2/+2
| | | |
| * | | Overwriting validate in your models has been deprecatedHenare Degan2012-12-12-9/+11
| | | |
| * | | Method-style callbacks are deprecated for after_initializeHenare Degan2012-12-11-11/+14
| |/ /
* | | Return a string from user.name always to avoid any complications with other ↵hotfix/0.9.0.5Louise Crow2013-05-28-1/+3
| | | | | | | | | | | | functions calling gsub on the result. SafeBuffer won't work with gsub until Rails 3.2 https://github.com/rails/rails/commit/b4a6e2f8442ceda118367f9a61c38af754be1cbf
* | | Mark ban text as html safeLouise Crow2013-04-29-1/+1
| | |
* | | Small refactorMatthew Landauer2013-04-02-6/+1
| |/ |/|
* | Don't escape links that are automatically added in user biosMatthew Landauer2013-02-11-1/+2
| |
* | User model - Overwriting validate is deprecated in Rails 3Henare Degan2013-01-25-9/+11
|/
* Move address_from_name_and_email to mail handler.Louise Crow2012-11-15-1/+1
|
* Given that MAX_REQUESTS_PER_USER_PER_DAY is documented as an optional ↵Louise Crow2012-10-25-1/+1
| | | | variable, but that commonlib/rblib/config.rb does not allow nil defaults, replace nil value clause (which can never be reached) with blank value condition(blank now returned by default by lib/configuation.rb)
* Extract method for finding whether user is a superuserMatthew Landauer2012-10-18-3/+8
|
* Extract configuration with defaults into one moduleMatthew Landauer2012-09-25-9/+6
|
* Add an option to disable comments on a requestRobin Houston2012-09-19-7/+1
| | | | Closes #30.
* WIP new requests feedRobin Houston2012-07-04-3/+0
|
* Only invalidate a user's cached requests when their *name* changes. ↵Seb Bacon2012-06-20-2/+3
| | | | Otherwise we issue PURGEs every time, for example, we send out email alerts.
* Return column name when iterating over admin fields.Seb Bacon2012-06-12-1/+1
|
* Further annotation correctionsSeb Bacon2012-05-24-25/+26
|
* Re-annotate modelsSeb Bacon2012-05-24-24/+26
|
* Merge from wombleton:feature/440_sparkly_admin_cssSeb Bacon2012-05-23-1/+11
| | | | | | | Includes a couple of additional fixes: * Remember to HTML-quote things that could come from users * Fix form post action for editing users
* Remove trailing whitespace (to make a cleaner forthcoming merge with ↵Seb Bacon2012-05-15-26/+26
| | | | wombleton:feature/440_sparkly_admin_css)
* first stab at sending PURGE requests to upstream varnish for request pages. ↵Seb Bacon2012-03-13-0/+7
| | | | Next step: making it asynchronous, e.g. with a queue of things to purge via a cron job.
* Don’t index unconfirmed usersRobin Houston2012-02-06-1/+6
| | | | Closes #415.
* Let admin users use auto-login URLsRobin Houston2012-02-06-0/+6
| | | | | | Don't change logged-in user from an admin when visiting a auto-login URL. Closes #306.
* Change wording of rate-limited pageRobin Houston2012-02-05-0/+10
| | | | | Include information about what the per-day limit is, and when the user can next make a request. Fixes #412.
* Change (Banned) to (Account suspended)Robin Houston2012-01-31-1/+1
| | | | | | | | When a user account has been suspended, we write (Banned) after their user name. But sometimes we need to suspend accounts temporarily, such as pending the result of a discussion, and it is misleading to write (Banned) in such cases; so let’s change it to (Account suspended) instead.
* Rate limitingRobin Houston2012-01-29-3/+19
| | | | | | Add the capability to specify a limit to the number of requests a user can make per day, which can be turned off for specific users in the admin interface.
* Ensure model schema documentation is up to date.Seb Bacon2012-01-09-3/+4
|
* Merge branch 'wdtk' into developRobin Houston2011-09-08-3/+27
|\ | | | | | | | | | | Conflicts: config/general.yml-example spec/models/track_mailer_spec.rb
| * Fix User.should_be_emailed?Robin Houston2011-09-08-8/+10
| | | | | | | | | | The User.should_be_emailed? method needs to be public. It should also be tested.
| * Fix “email bounced” recordingRobin Houston2011-09-07-8/+8
| | | | | | | | | | Add tests for the User.record_bounce_for_email method and (not coincidentally) make it actually work.
| * Change the type of User.email_bounce_message to :text, because weRobin Houston2011-09-07-1/+1
| | | | | | | | are storing the entire bounce email in there now.