aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_posts/2017-03-31-v2.0.3.md
blob: cfbe75c522cc447629f46737543fe94a2fc4829e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
layout: post
title: Version 2.0.3
author: matthew
---

<div class="r" align="right">
<a data-flickr-embed="true"  href="https://www.flickr.com/photos/mssuziecue/2637008185/" title="Untitled"><img src="https://c1.staticflickr.com/4/3071/2637008185_6c4bd4d6a0.jpg" width="440" height="500" alt="Untitled"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
</div>

Today we have released **version 2.0.3** of FixMyStreet,
a bugfix release along with some other improvements.

The map on a mobile report page can now be made full screen, and if you are
using Google Maps you can supply a custom map styling. There's also now a
loading indicator whilst data is being fetched for the map.

Various missing translations have been added, for moderation, social login,
and offline usage.

We've upgraded our email sending to deal with issues sending with SSL, dealt
with IE11 caching report Ajax calls too aggressively, and with Safari 5/
Android 4 not showing our questionnaire answer buttons.

Performance improvements include moving admin-related JavaScript to its own
file (so normal users don't need to download it), and reducing the amount of
disk stats the code performs.

Lastly, all the test suite can now run offline, and amusingly I found a bug in
a test that only happened if the test was run c. 55 hours before daylight
savings time began :)

[Full changelog](https://github.com/mysociety/fixmystreet/releases/tag/v2.0.3)
ion> Unnamed repository; edit this file 'description' to name the repository.MimesBrønn
aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/change_email_validator.rb
blob: dd0fe1b9ba5f4d826873a26f59533b2c085b7974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# == Schema Information
# Schema version: 92
#
# Table name: change_email_validators
#
#  old_email :string          
#  new_email :string          
#  password  :string          
#

# models/changeemail_validator.rb:
# Validates email change form submissions.
#
# Copyright (c) 2010 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: contact_validator.rb,v 1.32 2009-09-17 21:10:05 francis Exp $

class ChangeEmailValidator < ActiveRecord::BaseWithoutTable
    strip_attributes!

    column :old_email, :string
    column :new_email, :string
    column :password, :string

    attr_accessor :logged_in_user

    validates_presence_of :old_email, :message => "^Please enter your old email address"
    validates_presence_of :new_email, :message => "^Please enter your new email address"
    validates_presence_of :password, :message => "^Please enter your password"

    def validate
        if !self.old_email.blank? && !MySociety::Validate.is_valid_email(self.old_email)
            errors.add(:old_email, "doesn't look like a valid address") 
        end

        if !errors[:old_email] 
            if self.old_email.downcase != self.logged_in_user.email.downcase
                errors.add(:old_email, "address isn't the same as the address of the account you are logged in with") 
            elsif !self.logged_in_user.has_this_password?(self.password)
                if !errors[:password]
                    errors.add(:password, "is not correct") 
                end
            end
        end

        if !self.new_email.blank? && !MySociety::Validate.is_valid_email(self.new_email)
            errors.add(:new_email, "doesn't look like a valid address") 
        end
    end

end