Project

General

Profile

Feature #21421 » 0001-Store-user-s-IP-address-for-the-duration-of-the-requ.patch

Jan from Planio www.plan.io, 2015-12-04 09:29

View differences:

app/controllers/application_controller.rb
133 133
        end
134 134
      end
135 135
    end
136
    # store current ip address in user object ephemerally
137
    user.remote_ip = request.remote_ip if user
136 138
    user
137 139
  end
138 140

  
app/models/user.rb
92 92

  
93 93
  attr_accessor :password, :password_confirmation, :generate_password
94 94
  attr_accessor :last_before_login_on
95
  attr_accessor :remote_ip
96

  
95 97
  # Prevents unauthorized assignments
96 98
  attr_protected :login, :admin, :password, :password_confirmation, :hashed_password
97 99

  
config/locales/de.yml
1148 1148
  error_password_expired: Your password has expired or the administrator requires you
1149 1149
    to change it.
1150 1150
  field_time_entries_visibility: Time logs visibility
1151
  field_remote_ip: IP-Adresse
1151 1152
  label_parent_task_attributes: Parent tasks attributes
1152 1153
  label_parent_task_attributes_derived: Calculated from subtasks
1153 1154
  label_parent_task_attributes_independent: Independent of subtasks
config/locales/en.yml
351 351
  field_time_entries_visibility: Time logs visibility
352 352
  field_total_estimated_hours: Total estimated time
353 353
  field_default_version: Default version
354
  field_remote_ip: IP address
354 355

  
355 356
  setting_app_title: Application title
356 357
  setting_app_subtitle: Application subtitle
(1-1/9)