refinerycms-authentication-devise 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/workflows/release.yml +41 -0
- data/.github/workflows/ruby.yml +60 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +14 -8
- data/Rakefile +2 -1
- data/app/controllers/refinery/authentication/devise/admin/users_controller.rb +30 -20
- data/app/controllers/refinery/authentication/devise/passwords_controller.rb +33 -28
- data/app/models/refinery/authentication/devise/user.rb +1 -1
- data/config/locales/bg.yml +0 -1
- data/config/locales/ca.yml +0 -1
- data/config/locales/cs.yml +0 -1
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +0 -1
- data/config/locales/el.yml +0 -1
- data/config/locales/en.yml +0 -1
- data/config/locales/es.yml +0 -1
- data/config/locales/fi.yml +0 -1
- data/config/locales/fr.yml +0 -1
- data/config/locales/hu.yml +0 -1
- data/config/locales/it.yml +0 -1
- data/config/locales/ja.yml +0 -1
- data/config/locales/ko.yml +0 -1
- data/config/locales/lt.yml +0 -1
- data/config/locales/lv.yml +0 -1
- data/config/locales/nb.yml +0 -1
- data/config/locales/nl.yml +0 -1
- data/config/locales/pl.yml +0 -1
- data/config/locales/pt-BR.yml +0 -1
- data/config/locales/pt.yml +0 -1
- data/config/locales/rs.yml +0 -1
- data/config/locales/ru.yml +0 -1
- data/config/locales/sk.yml +0 -1
- data/config/locales/sl.yml +0 -1
- data/config/locales/sv.yml +0 -1
- data/config/locales/tr.yml +0 -1
- data/config/locales/uk.yml +0 -1
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-CN.yml +0 -1
- data/config/locales/zh-TW.yml +0 -1
- data/lib/refinery/authentication/devise.rb +1 -1
- data/refinerycms-authentication-devise.gemspec +3 -3
- data/spec/controllers/refinery/authentication/devise/admin/users_controller_spec.rb +20 -5
- data/spec/factories/user.rb +3 -3
- data/spec/features/refinery/authentication/devise/admin/users_spec.rb +2 -2
- data/spec/features/refinery/authentication/devise/passwords_spec.rb +35 -34
- data/spec/features/refinery/authentication/devise/sessions_spec.rb +3 -3
- data/spec/lib/refinery/authentication/devise/path_helpers_spec.rb +24 -0
- data/spec/models/refinery/user_spec.rb +13 -13
- data/spec/spec_helper.rb +11 -0
- data/spec/support/refinery/authentication/devise/controller_macros.rb +3 -6
- data/spec/support/refinery/authentication/devise/feature_macros.rb +1 -1
- metadata +10 -17
- data/.travis.yml +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 8321c15607ac20c84897600f16db9ab009613cd1fd0f0a1b4ef6d5106bcdba3e
|
|
4
|
+
data.tar.gz: 916963aca87bf1408d5be0829887115a4aff25e72b124924951d26b697275b3a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 39056d9a9e230da6424b9ee474d097726a11d3cc888387c876015b74c7a1274367e6c996b56ff0da909a2805c84c7009fbff688a518cd2e52ca1c89fbe24c2c8
|
|
7
|
+
data.tar.gz: 44ae073f819964d0641e066ca49f6cff176f93f95a0b8fe9c7ad911fbf7559bfb76ebaa2505715880970ea1b506add02fa13cd9be9d94fecdbd51f65465af695
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Release Gem to rubygems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
push:
|
|
10
|
+
if: github.repository == 'refinery/refinerycms-authentication-devise'
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: release
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
id-token: write
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
# Set up
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: ruby
|
|
25
|
+
|
|
26
|
+
# Release
|
|
27
|
+
#
|
|
28
|
+
# The gem is built with `gem build` and pushed with `gem push` rather than
|
|
29
|
+
# through `rake release`, so no bundle is installed. This keeps the same
|
|
30
|
+
# workflow working on older release lines whose bundle does not resolve
|
|
31
|
+
# on a current Ruby.
|
|
32
|
+
#
|
|
33
|
+
# rubygems/configure-rubygems-credentials exchanges the GitHub Actions OIDC
|
|
34
|
+
# token for a temporary RubyGems API key, enabling trusted publishing without
|
|
35
|
+
# storing any secrets.
|
|
36
|
+
- name: Configure RubyGems credentials
|
|
37
|
+
uses: rubygems/configure-rubygems-credentials@v2.0.0
|
|
38
|
+
- name: Release gem
|
|
39
|
+
run: |
|
|
40
|
+
gem build refinerycms-authentication-devise.gemspec --output refinerycms-authentication-devise.gem
|
|
41
|
+
gem push refinerycms-authentication-devise.gem
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
database: [ sqlite3, mysql, postgresql ]
|
|
14
|
+
ruby: [ 4.0, 3.4, 3.3, 3.2 ]
|
|
15
|
+
rails: [ '~> 8.1.0', '~> 8.0.0', '~> 7.2.0', '~> 6.1.0' ]
|
|
16
|
+
exclude:
|
|
17
|
+
- ruby: 3.4
|
|
18
|
+
rails: '~> 6.1.0'
|
|
19
|
+
- ruby: 4.0
|
|
20
|
+
rails: '~> 6.1.0'
|
|
21
|
+
- database: sqlite3
|
|
22
|
+
rails: '~> 6.1.0'
|
|
23
|
+
fail-fast: false
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
|
|
26
|
+
env:
|
|
27
|
+
CI: true
|
|
28
|
+
DB: ${{ matrix.database }}
|
|
29
|
+
MYSQL_PASSWORD: root
|
|
30
|
+
PGHOST: localhost
|
|
31
|
+
PGPASSWORD: runner
|
|
32
|
+
PGUSER: runner
|
|
33
|
+
RAILS_ENV: test
|
|
34
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
|
35
|
+
RETRY_COUNT: 3
|
|
36
|
+
|
|
37
|
+
name: rails ${{ matrix.rails }} ruby ${{ matrix.ruby }} ${{ matrix.database }}
|
|
38
|
+
steps:
|
|
39
|
+
- run: sudo apt-get update && sudo apt-get install libsqlite3-dev -y
|
|
40
|
+
- uses: actions/checkout@v6
|
|
41
|
+
- uses: ruby/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
bundler-cache: true
|
|
44
|
+
ruby-version: ${{ matrix.ruby }}
|
|
45
|
+
|
|
46
|
+
- name: "Set up MySQL using VM's server"
|
|
47
|
+
if: ${{ env.DB == 'mysql' }}
|
|
48
|
+
run: |
|
|
49
|
+
sudo apt-get install libmysqlclient-dev -y
|
|
50
|
+
sudo systemctl start mysql.service
|
|
51
|
+
|
|
52
|
+
- name: "Set up PostgreSQL using VM's server"
|
|
53
|
+
if: ${{ env.DB == 'postgresql' }}
|
|
54
|
+
run: |
|
|
55
|
+
sudo apt-get install libpq-dev -y
|
|
56
|
+
sudo systemctl start postgresql.service
|
|
57
|
+
sudo -u postgres psql -c "CREATE USER runner WITH SUPERUSER PASSWORD 'runner'"
|
|
58
|
+
|
|
59
|
+
- run: bin/rake refinery:testing:dummy_app
|
|
60
|
+
- run: bin/rspec spec
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## 2.0.1 [21 November 2026]
|
|
2
|
+
|
|
3
|
+
* Fix authenticated privilege escalation via plugin self-assignment [GHSA-rvc7-xf2h-wf33](https://github.com/refinery/refinerycms-authentication-devise/security/advisories/GHSA-rvc7-xf2h-wf33) ([bl4cksku11](https://github.com/bl4cksku11))
|
|
4
|
+
|
|
5
|
+
- [See full list](https://github.com/refinery/refinerycms-authentication-devise/compare/2.0.0...2.0.1)
|
|
6
|
+
|
|
7
|
+
## 2.0.0
|
|
8
|
+
|
|
9
|
+
- [See full list](https://github.com/refinery/refinerycms-authentication-devise/compare/1.0.4...2.0.0)
|
data/Gemfile
CHANGED
|
@@ -2,7 +2,9 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gemspec
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
|
|
6
|
+
|
|
7
|
+
git "https://github.com/refinery/refinerycms", branch: "main" do
|
|
6
8
|
gem "refinerycms"
|
|
7
9
|
|
|
8
10
|
group :test do
|
|
@@ -11,37 +13,41 @@ git "https://github.com/refinery/refinerycms", branch: "master" do
|
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
# Database Configuration
|
|
14
|
-
|
|
16
|
+
if !ENV["CI"] || ENV["DB"] == "sqlite3"
|
|
15
17
|
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
|
|
16
18
|
gem "sqlite3", :platform => :ruby
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
if !ENV["
|
|
21
|
+
if !ENV["CI"] || ENV["DB"] == "mysql"
|
|
20
22
|
gem "activerecord-jdbcmysql-adapter", :platform => :jruby
|
|
21
23
|
gem "jdbc-mysql", "= 5.1.13", :platform => :jruby
|
|
22
24
|
gem "mysql2", :platform => :ruby
|
|
23
25
|
end
|
|
24
26
|
|
|
25
|
-
if !ENV["
|
|
27
|
+
if !ENV["CI"] || ENV["DB"] == "postgresql"
|
|
26
28
|
gem "activerecord-jdbcpostgresql-adapter", :platform => :jruby
|
|
27
29
|
gem "pg", :platform => :ruby
|
|
28
30
|
end
|
|
29
31
|
|
|
30
32
|
gem "jruby-openssl", :platform => :jruby
|
|
31
33
|
|
|
32
|
-
# Refinery/rails should pull in the proper versions of these
|
|
33
34
|
group :assets do
|
|
34
35
|
gem "sass-rails"
|
|
35
36
|
gem "coffee-rails"
|
|
36
37
|
gem "uglifier"
|
|
37
38
|
end
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
gem 'listen'
|
|
41
|
+
|
|
42
|
+
# Ruby 3.4+ extracted mutex_m from stdlib, but older Rails versions need it
|
|
43
|
+
gem 'mutex_m' if RUBY_VERSION >= '3.4' && ENV['RAILS_VERSION']&.match?(/^~> [67]\./)
|
|
44
|
+
|
|
45
|
+
gem 'json', '< 3' if ENV['RAILS_VERSION']&.match?(/^~> (6|7|8\.0)\./)
|
|
42
46
|
|
|
43
47
|
group :test do
|
|
48
|
+
gem "database_cleaner-active_record"
|
|
44
49
|
gem "launchy"
|
|
50
|
+
gem "pry"
|
|
45
51
|
end
|
|
46
52
|
|
|
47
53
|
# Load local gems according to Refinery developer preference.
|
data/Rakefile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env rake
|
|
2
|
+
require 'logger'
|
|
2
3
|
begin
|
|
3
4
|
require 'bundler/setup'
|
|
4
5
|
rescue LoadError
|
|
@@ -8,7 +9,7 @@ end
|
|
|
8
9
|
ENGINE_PATH = File.dirname(__FILE__)
|
|
9
10
|
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
|
10
11
|
|
|
11
|
-
if File.
|
|
12
|
+
if File.exist?(APP_RAKEFILE)
|
|
12
13
|
load 'rails/tasks/engine.rake'
|
|
13
14
|
end
|
|
14
15
|
|
|
@@ -5,13 +5,14 @@ module Refinery
|
|
|
5
5
|
class UsersController < Refinery::AdminController
|
|
6
6
|
|
|
7
7
|
crudify :'refinery/authentication/devise/user',
|
|
8
|
-
:
|
|
9
|
-
:
|
|
8
|
+
order: 'username ASC',
|
|
9
|
+
title_attribute: 'username',
|
|
10
|
+
exclude_from_find: :show
|
|
10
11
|
|
|
11
12
|
before_action :find_available_plugins, :find_available_roles,
|
|
12
|
-
:
|
|
13
|
-
before_action :redirect_unless_user_editable!, :
|
|
14
|
-
before_action :exclude_password_assignment_when_blank!, :
|
|
13
|
+
only: [:new, :create, :edit, :update]
|
|
14
|
+
before_action :redirect_unless_user_editable!, only: [:edit, :update]
|
|
15
|
+
before_action :exclude_password_assignment_when_blank!, only: :update
|
|
15
16
|
|
|
16
17
|
def new
|
|
17
18
|
@user = Refinery::Authentication::Devise::User.new
|
|
@@ -37,18 +38,22 @@ module Refinery
|
|
|
37
38
|
def update
|
|
38
39
|
# Store what the user selected.
|
|
39
40
|
@selected_role_names = params[:user].delete(:roles) || []
|
|
40
|
-
@selected_role_names = @user.roles.
|
|
41
|
+
@selected_role_names = @user.roles.pluck(:title) unless user_can_assign_roles?
|
|
41
42
|
@selected_plugin_names = params[:user][:plugins]
|
|
43
|
+
unless user_can_assign_plugins?
|
|
44
|
+
@selected_plugin_names = @user.plugins.pluck(:name)
|
|
45
|
+
params[:user][:plugins] = @selected_plugin_names
|
|
46
|
+
end
|
|
42
47
|
|
|
43
48
|
if user_is_locking_themselves_out?
|
|
44
|
-
flash.now[:error] = t('lockout_prevented', :
|
|
49
|
+
flash.now[:error] = t('lockout_prevented', scope: 'refinery.authentication.devise.admin.users.update')
|
|
45
50
|
render :edit and return
|
|
46
51
|
end
|
|
47
52
|
|
|
48
53
|
store_user_memento
|
|
49
54
|
|
|
50
|
-
@user.roles = @selected_role_names.map { |r| Refinery::Authentication::Devise::Role[r.
|
|
51
|
-
if @user.
|
|
55
|
+
@user.roles = @selected_role_names.map { |r| Refinery::Authentication::Devise::Role[r.underscore] }
|
|
56
|
+
if @user.update user_params.to_h
|
|
52
57
|
update_successful
|
|
53
58
|
else
|
|
54
59
|
update_failed
|
|
@@ -63,13 +68,13 @@ module Refinery
|
|
|
63
68
|
# if the user is a superuser and can assign roles according to this site's
|
|
64
69
|
# settings then the roles are set with the POST data.
|
|
65
70
|
if user_can_assign_roles?
|
|
66
|
-
@user.roles = @selected_role_names.map { |r| Refinery::Authentication::Devise::Role[r.
|
|
71
|
+
@user.roles = @selected_role_names.map { |r| Refinery::Authentication::Devise::Role[r.underscore] }
|
|
67
72
|
else
|
|
68
73
|
@user.add_role :refinery
|
|
69
74
|
end
|
|
70
75
|
|
|
71
76
|
redirect_to refinery.authentication_devise_admin_users_path,
|
|
72
|
-
:
|
|
77
|
+
notice: t('created', what: @user.username, scope: 'refinery.crudify')
|
|
73
78
|
end
|
|
74
79
|
|
|
75
80
|
def create_failed
|
|
@@ -78,7 +83,7 @@ module Refinery
|
|
|
78
83
|
|
|
79
84
|
def update_successful
|
|
80
85
|
redirect_to refinery.authentication_devise_admin_users_path,
|
|
81
|
-
:
|
|
86
|
+
notice: t('updated', what: @user.username, scope: 'refinery.crudify')
|
|
82
87
|
end
|
|
83
88
|
|
|
84
89
|
def update_failed
|
|
@@ -88,9 +93,10 @@ module Refinery
|
|
|
88
93
|
end
|
|
89
94
|
|
|
90
95
|
def find_available_plugins
|
|
91
|
-
@available_plugins = Refinery::Plugins.registered.in_menu.map
|
|
92
|
-
{ :
|
|
93
|
-
|
|
96
|
+
@available_plugins = Refinery::Plugins.registered.in_menu.map do |a|
|
|
97
|
+
{ name: a.name, title: a.title }
|
|
98
|
+
end
|
|
99
|
+
@available_plugins.sort_by { |a| a[:title] }
|
|
94
100
|
end
|
|
95
101
|
|
|
96
102
|
def find_available_roles
|
|
@@ -104,6 +110,7 @@ module Refinery
|
|
|
104
110
|
end
|
|
105
111
|
|
|
106
112
|
private
|
|
113
|
+
|
|
107
114
|
def exclude_password_assignment_when_blank!
|
|
108
115
|
if params[:user][:password].blank? && params[:user][:password_confirmation].blank?
|
|
109
116
|
params[:user].extract!(:password, :password_confirmation)
|
|
@@ -115,11 +122,15 @@ module Refinery
|
|
|
115
122
|
current_refinery_user.has_role?(:superuser)
|
|
116
123
|
end
|
|
117
124
|
|
|
125
|
+
def user_can_assign_plugins?
|
|
126
|
+
current_refinery_user.has_role?(:superuser)
|
|
127
|
+
end
|
|
128
|
+
|
|
118
129
|
def user_is_locking_themselves_out?
|
|
119
130
|
return false if current_refinery_user.id != @user.id || @selected_plugin_names.blank?
|
|
120
131
|
|
|
121
132
|
@selected_plugin_names.exclude?('refinery_authentication_devise') || # removing user plugin access
|
|
122
|
-
@selected_role_names.map(&:
|
|
133
|
+
@selected_role_names.map(&:underscore).exclude?('refinery') # Or we're removing the refinery role
|
|
123
134
|
end
|
|
124
135
|
|
|
125
136
|
def store_user_memento
|
|
@@ -135,10 +146,9 @@ module Refinery
|
|
|
135
146
|
end
|
|
136
147
|
|
|
137
148
|
def user_params
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
)
|
|
149
|
+
permitted = [:email, :password, :password_confirmation, :remember_me, :username, :login, :full_name]
|
|
150
|
+
permitted << { plugins: [] } if current_refinery_user.has_role?(:superuser)
|
|
151
|
+
params.require(:user).permit(*permitted)
|
|
142
152
|
end
|
|
143
153
|
end
|
|
144
154
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Refinery
|
|
2
4
|
module Authentication
|
|
3
5
|
module Devise
|
|
@@ -5,20 +7,33 @@ module Refinery
|
|
|
5
7
|
helper Refinery::Core::Engine.helpers
|
|
6
8
|
layout 'refinery/layouts/login'
|
|
7
9
|
|
|
8
|
-
before_action :store_password_reset_return_to, :only => [:update]
|
|
9
|
-
def store_password_reset_return_to
|
|
10
|
-
session[:'return_to'] = Refinery::Core.backend_path
|
|
11
|
-
end
|
|
12
|
-
protected :store_password_reset_return_to
|
|
13
|
-
|
|
14
10
|
# Rather than overriding devise, it seems better to just apply the notice here.
|
|
15
|
-
after_action :give_notice, :
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
after_action :give_notice, only: :update
|
|
12
|
+
|
|
13
|
+
before_action :store_password_reset_return_to, only: :update
|
|
14
|
+
|
|
15
|
+
# POST /registrations/password
|
|
16
|
+
def create
|
|
17
|
+
if params[:authentication_devise_user].present? &&
|
|
18
|
+
(email = params[:authentication_devise_user][:email]).present?
|
|
19
|
+
|
|
20
|
+
user = User.where(email: email).first
|
|
21
|
+
|
|
22
|
+
if user.present?
|
|
23
|
+
token = user.generate_reset_password_token!
|
|
24
|
+
UserMailer.reset_notification(user, request, token).deliver_now
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
redirect_to refinery.login_path,
|
|
28
|
+
notice: t('email_reset_sent', scope: 'refinery.authentication.devise.users.forgot')
|
|
29
|
+
else
|
|
30
|
+
flash.now[:error] = t('blank_email', scope: 'refinery.authentication.devise.users.forgot')
|
|
31
|
+
|
|
32
|
+
new
|
|
33
|
+
|
|
34
|
+
render :new
|
|
19
35
|
end
|
|
20
36
|
end
|
|
21
|
-
protected :give_notice
|
|
22
37
|
|
|
23
38
|
# GET /registrations/password/edit?reset_password_token=abcdef
|
|
24
39
|
def edit
|
|
@@ -27,26 +42,16 @@ module Refinery
|
|
|
27
42
|
resource.reset_password_token = params[:reset_password_token]
|
|
28
43
|
end
|
|
29
44
|
|
|
30
|
-
|
|
31
|
-
def create
|
|
32
|
-
if params[:authentication_devise_user].present? && (email = params[:authentication_devise_user][:email]).present? &&
|
|
33
|
-
(user = User.where(:email => email).first).present?
|
|
45
|
+
protected
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
redirect_to refinery.login_path,
|
|
38
|
-
:notice => t('email_reset_sent', :scope => 'refinery.authentication.devise.users.forgot')
|
|
39
|
-
else
|
|
40
|
-
flash.now[:error] = if (email = params[:authentication_devise_user][:email]).blank?
|
|
41
|
-
t('blank_email', :scope => 'refinery.authentication.devise.users.forgot')
|
|
42
|
-
else
|
|
43
|
-
t('email_not_associated_with_account_html', :email => ERB::Util.html_escape(email), :scope => 'refinery.authentication.devise.users.forgot').html_safe
|
|
44
|
-
end
|
|
47
|
+
def give_notice
|
|
48
|
+
return if resource.errors.any?
|
|
45
49
|
|
|
46
|
-
|
|
50
|
+
flash[:notice] = t('successful', scope: 'refinery.authentication.devise.users.reset', email: resource.email)
|
|
51
|
+
end
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
def store_password_reset_return_to
|
|
54
|
+
session[:return_to] = Refinery::Core.backend_path
|
|
50
55
|
end
|
|
51
56
|
end
|
|
52
57
|
end
|
|
@@ -49,7 +49,7 @@ module Refinery
|
|
|
49
49
|
# https://github.com/plataformatec/devise/blob/v3.2.4/lib/devise/models/recoverable.rb#L45-L56
|
|
50
50
|
def generate_reset_password_token!
|
|
51
51
|
raw, enc = ::Devise.token_generator.generate(self.class, :reset_password_token)
|
|
52
|
-
|
|
52
|
+
update(
|
|
53
53
|
:reset_password_token => enc,
|
|
54
54
|
:reset_password_sent_at => Time.now.utc
|
|
55
55
|
)
|
data/config/locales/bg.yml
CHANGED
|
@@ -44,7 +44,6 @@ bg:
|
|
|
44
44
|
enter_email_address: Моля, въведете адреса на е-пощата на Вашия потребител.
|
|
45
45
|
reset_password: Смяна на парола
|
|
46
46
|
blank_email: Не сте въвели адрес на е-поща.
|
|
47
|
-
email_not_associated_with_account_html: 'За съжаление, "%{email}" не принадлежи на нито един потребител.<br />Сигурни ли сте, че въведохте точния адрес?'
|
|
48
47
|
email_reset_sent: До Вас бе изпратена е-поща, съдържаща връзка за смяна на паролата Ви.
|
|
49
48
|
password_encryption: Налага се да смените Вашата парола, тъй като метода за криптиране на пароли в Refinery бе променен. Чрез новия метод паролите се съхраняват по-сигурно отпреди.
|
|
50
49
|
reset:
|
data/config/locales/ca.yml
CHANGED
|
@@ -44,7 +44,6 @@ ca:
|
|
|
44
44
|
enter_email_address: "Indica l'e-mail del teu compte."
|
|
45
45
|
reset_password: Resetear contrasenya
|
|
46
46
|
blank_email: No has indicat un e-mail vàlid.
|
|
47
|
-
email_not_associated_with_account_html: "Perdò, però, '%{email}' no està associat a cap compte.<br />Segur que ho has teclejat correctament?"
|
|
48
47
|
email_reset_sent: "T'hem enviat un e-mail amb un enllaç per canviar la teva contrasenya."
|
|
49
48
|
password_encryption: "Necessites restablir la teva contrasenya perque va haver-hi canvis en els mètodes d'encriptació de contrasenyes que Refinery usa, ja que ara les contrasenyes són emmagatzemades amb una encriptació més forta que abans."
|
|
50
49
|
reset:
|
data/config/locales/cs.yml
CHANGED
|
@@ -44,7 +44,6 @@ cs:
|
|
|
44
44
|
enter_email_address: "Prosím, zadejte emailovou adresu."
|
|
45
45
|
reset_password: Resetovat heslo
|
|
46
46
|
blank_email: Musíte zadat emailovou adresu.
|
|
47
|
-
email_not_associated_with_account_html: "Email '%{email}' není asociován z žádným uživatelským kontem.<br />Jste si jisti, že jste použili správnou adresu?"
|
|
48
47
|
email_reset_sent: Byl vám odeslán email s odkazem na resetování hesla.
|
|
49
48
|
password_encryption: 'Musíte si změnit heslo, protože nastala změna v šifrovací metodě ukládáných hesel. Refinery se stává více bezpečnější než dříve.'
|
|
50
49
|
reset:
|
data/config/locales/da.yml
CHANGED
|
@@ -38,7 +38,6 @@ da:
|
|
|
38
38
|
enter_email_address: Indtast den email-adresse du har tilknyttet din konto.
|
|
39
39
|
reset_password: Nulstil adgangskode
|
|
40
40
|
blank_email: Du har ikke angivet en email-adresse.
|
|
41
|
-
email_not_associated_with_account_html: "Beklager, '%{email}' er ikke tilknyttet nogen konto.<br/>Er du sikker på du har skrevet den rigtige email-adresse?"
|
|
42
41
|
email_reset_sent: En email er blevet sendt til dig med et link til nulstille din adgangskode.
|
|
43
42
|
password_encryption: 'Du er nødt til at nulstille dit password, da vi har opdateret den kryptering som Refinery bruger.'
|
|
44
43
|
reset:
|
data/config/locales/de.yml
CHANGED
|
@@ -38,7 +38,6 @@ de:
|
|
|
38
38
|
enter_email_address: Bitte geben Sie die E-Mail-Adresse für Ihre Konto an.
|
|
39
39
|
reset_password: Passwort zurücksetzen
|
|
40
40
|
blank_email: Sie haben keine E-Mail-Adresse angegeben.
|
|
41
|
-
email_not_associated_with_account_html: "Tut mir leid, '%{email}' ist mit keinem Konto verbunden.<br />Sind Sie sicher, dass Sie die richtige E-Mail-Adresse eingegeben haben?"
|
|
42
41
|
email_reset_sent: 'Es wurde Ihnen eine E-Mail mit einem Link geschickt, durch den Sie ihr Passwort zurücksetzen können.'
|
|
43
42
|
password_encryption: 'Sie müssen ihr Passwort zurücksetzen, da es Änderungen in der Art der Passwortverschlüsselung gab, die Refinery nutzt, so dass Passwörter sogar noch stärker verschlüsselt werden als vorher.'
|
|
44
43
|
reset:
|
data/config/locales/el.yml
CHANGED
|
@@ -38,7 +38,6 @@ el:
|
|
|
38
38
|
enter_email_address: Παρακαλώ γράψτε το ηλεκτρονικό σας ταχυδρομείο.
|
|
39
39
|
reset_password: Αλλαγή κωδικού
|
|
40
40
|
blank_email: Δε γράψατε το email σας.
|
|
41
|
-
email_not_associated_with_account_html: "Συγγνώμη, '%{email}' δεν αντιστοιχεί σε κάποιο λογαριασμό.<br />Γράψατε σίγουρα το email σας σωστά;"
|
|
42
41
|
email_reset_sent: Σας έχει αποσταλεί email με ένα σύνδεσμο για να αλλάξετε κωδικό.
|
|
43
42
|
password_encryption: Πρέπει να αλλάξετε τον κωδικό σας γιατί υπήρχαν αλλαγές στον τρόπο που το Refinery κρυπτογραφεί τον κωδικό σας με στόχο την μεγαλύτερη ασφάλειά σας.
|
|
44
43
|
reset:
|
data/config/locales/en.yml
CHANGED
|
@@ -44,7 +44,6 @@ en:
|
|
|
44
44
|
enter_email_address: Please enter the email address for your account.
|
|
45
45
|
reset_password: Reset password
|
|
46
46
|
blank_email: You did not enter an email address.
|
|
47
|
-
email_not_associated_with_account_html: "Sorry, '%{email}' isn't associated with any accounts.<br />Are you sure you typed the correct email address?"
|
|
48
47
|
email_reset_sent: An email has been sent to you with a link to reset your password.
|
|
49
48
|
password_encryption: You need to reset your password because there were changes in the password encryption methods that Refinery uses so that passwords are stored with even stronger encryption than before.
|
|
50
49
|
reset:
|
data/config/locales/es.yml
CHANGED
|
@@ -38,7 +38,6 @@ es:
|
|
|
38
38
|
enter_email_address: Indica el e-mail de tu cuenta.
|
|
39
39
|
reset_password: Resetear contraseña
|
|
40
40
|
blank_email: No has indicado un e-mail válido.
|
|
41
|
-
email_not_associated_with_account_html: "Lo siento, el e-mail '%{email}' no está asociado a ninguna cuenta.<br />¿Seguro que lo has tecleado correctamente?"
|
|
42
41
|
email_reset_sent: Te hemos enviado un e-mail con un enlace para cambiar tu contraseña.
|
|
43
42
|
password_encryption: Necesitas restablecer tu contraseña debido a que hubo cambios en los métodos de encriptación de contraseñas que Refinery usa, ya que ahora las contraseñas son almacenadas con una encriptación más fuerte que antes.
|
|
44
43
|
reset:
|
data/config/locales/fi.yml
CHANGED
|
@@ -38,7 +38,6 @@ fi:
|
|
|
38
38
|
enter_email_address: Kirjoita tunnuksesi sähköpostiosoite.
|
|
39
39
|
reset_password: Nollaa salasana
|
|
40
40
|
blank_email: Et kirjoittanut sähköpostiosoitetta.
|
|
41
|
-
email_not_associated_with_account_html: "Valitettavasti osoitetta '%{email}' ei löydy tietokannasta.<br />Oletko varma, että kirjoitit oikean osoitteen?"
|
|
42
41
|
email_reset_sent: "Sinulle on lähetetty sähköposti, jonka kautta voit vaihtaa salasanan."
|
|
43
42
|
password_encryption: "Sinun täytyy vaihtaa salasanasi, koska Refineryn käyttämää salausmenetelmää on vaihdettu turvallisuussyistä."
|
|
44
43
|
reset:
|
data/config/locales/fr.yml
CHANGED
|
@@ -49,7 +49,6 @@ fr:
|
|
|
49
49
|
enter_email_address: Veuillez entrer votre adresse courriel.
|
|
50
50
|
reset_password: Changer le mot de passe
|
|
51
51
|
blank_email: Vous n'avez pas entré d'adresse courriel.
|
|
52
|
-
email_not_associated_with_account_html: "Désolé, '%{email}' n'est asssocié à aucun compte.<br />Êtes-vous sûr d'avoir correctement entré votre adresse courriel?"
|
|
53
52
|
email_reset_sent: Un courriel vous a été envoyé. Il contient un lien vous permettant de changer votre mot de passe.
|
|
54
53
|
password_encryption: Vous devez modifier votre mot de passe car Refinery utilise de nouvelles méthodes de cryptage. Les nouveaux mots de passe seront stockés avec un niveau de sécurité plus élevé.
|
|
55
54
|
reset:
|
data/config/locales/hu.yml
CHANGED
|
@@ -44,7 +44,6 @@ hu:
|
|
|
44
44
|
enter_email_address: Add meg a fiókodhoz tartozó email címed.
|
|
45
45
|
reset_password: Jelszó helyreállítás
|
|
46
46
|
blank_email: Nem adtál meg email címet.
|
|
47
|
-
email_not_associated_with_account_html: "Sajnáljuk, '%{email}' egyik fiókhoz sincs társítva.<br />Biztosan helyes email címet írtál be?"
|
|
48
47
|
email_reset_sent: 'Elküldünk egy levelet neked, ami tartalmazza a helyreállításhoz szükséges webcímet.'
|
|
49
48
|
password_encryption: 'Újra be kell állítanod a jelszavad, mert változtatások történtek a Refinery által használt jelszó titkosító módszerben, így a jelszavak még nagyobb biztonságban lesznek.'
|
|
50
49
|
reset:
|
data/config/locales/it.yml
CHANGED
|
@@ -44,7 +44,6 @@ it:
|
|
|
44
44
|
enter_email_address: "Inserisci l'indirizzo di posta elettronica per l'utente."
|
|
45
45
|
reset_password: Reimpostazione della password
|
|
46
46
|
blank_email: "Non hai inserito l'indirizzo email."
|
|
47
|
-
email_not_associated_with_account_html: "Spiacenti, '%{email}' non è associato ad alcun account. <br/>Sei sicuro di aver scritto l'indirizzo email corretto?"
|
|
48
47
|
email_reset_sent: Ti è stata inviata una e-mail con il link per reimpostare la password.
|
|
49
48
|
password_encryption: "È necessario reimpostare la password, poiché ci sono stati cambiamenti nei metodi di crittografia della password, in modo da rendere più sicuro l'accesso."
|
|
50
49
|
reset:
|
data/config/locales/ja.yml
CHANGED
|
@@ -38,7 +38,6 @@ ja:
|
|
|
38
38
|
enter_email_address: メールアドレスを記入して下さい。
|
|
39
39
|
reset_password: パスワードのリセット
|
|
40
40
|
blank_email: メールアドレス欄が空欄です
|
|
41
|
-
email_not_associated_with_account_html: "「%{email}」は記録に無いアドレスです。<br />今一度確認して下さい。"
|
|
42
41
|
email_reset_sent: パスワードをリセットする為のリンクをメールで送信しました。
|
|
43
42
|
password_encryption: パスワードの暗号が強化されましたので、パスワードをリセットする必要があります。
|
|
44
43
|
reset:
|
data/config/locales/ko.yml
CHANGED
|
@@ -44,7 +44,6 @@ ko:
|
|
|
44
44
|
enter_email_address: 계정에 등록된 메일 주소를 입력하세요.
|
|
45
45
|
reset_password: 비밀번호 초기화
|
|
46
46
|
blank_email: 메일 주소가 입력되지 않았습니다.
|
|
47
|
-
email_not_associated_with_account_html: "죄송합니다. '%{email}'로 등록된 계정을 찾을 수 없습니다.<br />메일 주소를 올바르게 입력했는지 확인해주세요."
|
|
48
47
|
email_reset_sent: 비밀번호 초기화 링크를 담은 메일을 발송했습니다.
|
|
49
48
|
password_encryption: 더 강력한 보안을 위해 Refinery의 비밀번호 암호화 방식이 변경되었습니다. 새 암호화를 적용하기 위해 비밀번호를 재설정해주세요.
|
|
50
49
|
reset:
|
data/config/locales/lt.yml
CHANGED
|
@@ -36,7 +36,6 @@ lt:
|
|
|
36
36
|
enter_email_address: Prašome nurodyti el. pašto adresą savo paskyrai.
|
|
37
37
|
reset_password: Slaptažodžio keitimas
|
|
38
38
|
blank_email: Jūs neįvedėte slaptažodžio
|
|
39
|
-
email_not_associated_with_account_html: "Atsiprašome, '%{email}' nėra susietas su jokia paskyra.<br />Ar tikrai nurodėte teisingą el. pašto adresą?"
|
|
40
39
|
email_reset_sent: El. laiškas buvo nusiųstas jums su nuoroda kur galite pakeisti slaptažodį.
|
|
41
40
|
reset:
|
|
42
41
|
successful: "'%{email}' slaptažodis sėkmingai atnaujintas"
|
data/config/locales/lv.yml
CHANGED
|
@@ -38,7 +38,6 @@ lv:
|
|
|
38
38
|
enter_email_address: 'Lūdzu, norādiet sava konta epasta adresi.'
|
|
39
39
|
reset_password: Atjaunot paroli
|
|
40
40
|
blank_email: Jūs nenorādījāt epasta adresi.
|
|
41
|
-
email_not_associated_with_account_html: "Atvainojiet, epasts '%{email}' nav piesaistīts nevienam kontam.<br />Vai tiešām norādījāt korektu epastu?"
|
|
42
41
|
email_reset_sent: "Uz jūsu epastu tika izsūtīta vēstule, kura satur saiti, lai atjaunotu paroli."
|
|
43
42
|
password_encryption: 'Jums ir jāatjauno parole, jo tika veiktas izmaiņas Refinery paroļu kriptēšanas sistēmā.'
|
|
44
43
|
reset:
|
data/config/locales/nb.yml
CHANGED
|
@@ -38,7 +38,6 @@ nb:
|
|
|
38
38
|
enter_email_address: Vennligst tast inn e-post adressen for din konto.
|
|
39
39
|
reset_password: Tilbakestill passord
|
|
40
40
|
blank_email: Du har ikke oppgitt noen e-post adresse.
|
|
41
|
-
email_not_associated_with_account_html: "Beklager, '%{email}' er ikke tilknyttet noen konto.<br/>Er du sikker på at du tastet inn riktig e-post adresse?"
|
|
42
41
|
email_reset_sent: En e-post har blitt sendt til deg med en lenke for å tilbakestille passordet ditt.
|
|
43
42
|
password_encryption: Du må tilbakestille ditt passord da det er gjort endringer i krypteringsteknologien som Refinery benttter. Endringene gjør at passordene lagres med en enda sterkere kryptering enn tidlgere.
|
|
44
43
|
reset:
|
data/config/locales/nl.yml
CHANGED
|
@@ -44,7 +44,6 @@ nl:
|
|
|
44
44
|
enter_email_address: Vul het e-mailadres van uw account in.
|
|
45
45
|
reset_password: Een nieuw wachtwoord aanvragen
|
|
46
46
|
blank_email: Uw heeft geen e-mailadres ingevuld.
|
|
47
|
-
email_not_associated_with_account_html: "Sorry, '%{email}' is niet gekoppeld aan een account. <br/>Weet u zeker dat u het juiste e-mailadres heeft ingevuld?"
|
|
48
47
|
email_reset_sent: Er is een e-mail naar u verzonden met een link om een nieuw wachtwoord in te stellen.
|
|
49
48
|
password_encryption: 'U moet een nieuw wachtwoord instellen omdat de wachtwoordversleuteling van Refinery is verbeterd, hiermee wordt uw wachtwoord nog veiliger opgeslagen.'
|
|
50
49
|
reset:
|
data/config/locales/pl.yml
CHANGED
|
@@ -38,7 +38,6 @@ pl:
|
|
|
38
38
|
enter_email_address: Proszę podaj adres e-mail dla Twojego konta.
|
|
39
39
|
reset_password: Reset hasła
|
|
40
40
|
blank_email: Nie podano żadnego adresu e-mail.
|
|
41
|
-
email_not_associated_with_account_html: "Przepraszamy, '%{email}' nie jest adresem żadnego z zarejestrowanych użytkownikiem. <br />Czy to na pewno prawidłowy adres?"
|
|
42
41
|
email_reset_sent: Został wysłany e-mail z linkiem umożliwiającym reset hasła.
|
|
43
42
|
password_encryption: Musisz zmienić swoje hasło ponieważ wprowadziliśmy zmiany w używanej w Rafinery metodzie szyfrowania. Teraz hasła są jeszcze lepiej chronione.
|
|
44
43
|
reset:
|
data/config/locales/pt-BR.yml
CHANGED
|
@@ -38,7 +38,6 @@ pt-BR:
|
|
|
38
38
|
enter_email_address: "Por favor, preencha o endereço de email da sua conta."
|
|
39
39
|
reset_password: Recuperar senha
|
|
40
40
|
blank_email: Você não preencheu um endereço de e-mail.
|
|
41
|
-
email_not_associated_with_account_html: "Desculpe, '%{email}' não está associado com alguma conta. <br/>Tem certeza que você digitou o endereço de email correto?"
|
|
42
41
|
email_reset_sent: Um email foi enviado para você com um link para recuperar sua senha.
|
|
43
42
|
password_encryption: Você precisa redefinir sua senha pois existem mudanças nos métodos de criptografia usados pelo Refinery, as senhas são armazenadas com uma encriptação maior do que anteriormente.
|
|
44
43
|
reset:
|
data/config/locales/pt.yml
CHANGED
|
@@ -44,7 +44,6 @@ pt:
|
|
|
44
44
|
enter_email_address: Por favor escreva o email para a sua conta.
|
|
45
45
|
reset_password: Reset da password
|
|
46
46
|
blank_email: Não inseriu nenhum email.
|
|
47
|
-
email_not_associated_with_account_html: "Desculpe, '%{email}' não está associado a nenhuma conta.<br />Tem a certeza de que escreveu o email correcto??"
|
|
48
47
|
email_reset_sent: Um email foi enviado com um link para fazer reset à password.
|
|
49
48
|
password_encryption: Deve pedir um reset à sua password pois houveram alterações à forma como a plataforma encripta as passwords.
|
|
50
49
|
reset:
|
data/config/locales/rs.yml
CHANGED
|
@@ -38,7 +38,6 @@ rs:
|
|
|
38
38
|
enter_email_address: Molimo unesi email adresu za tvoj nalog.
|
|
39
39
|
reset_password: Resetuj lozinku
|
|
40
40
|
blank_email: Nisi uneo email adresu.
|
|
41
|
-
email_not_associated_with_account_html: "Izvini, '%{email}' ne pripada nijednom nalogu.<br />Da li si siguran da si ukucao tačnu email adresu?"
|
|
42
41
|
email_reset_sent: Poslat ti je mail sa linkom za resetovanje lozinke.
|
|
43
42
|
password_encryption: "Moraš da resetuješ lozinku, zato što je došlo do promene u metodama za enkripciju koje Refinery koristi za zaštitu podataka.Podaci će od sada biti sigurniji nego ranije."
|
|
44
43
|
reset:
|