Commit 6909b57a authored by Rafael Ravedutti's avatar Rafael Ravedutti

Add allow_password_change field to accounts

Signed-off-by: Rafael Ravedutti's avatarRafael Ravedutti <>
parent 8e1d9cac
Pipeline #16702 passed with stages
in 3 minutes and 38 seconds
......@@ -75,7 +75,7 @@ module Api::V1
@resource.skip_confirmation! if @resource.devise_modules.include?(:confirmable) && !@resource.confirmed_at
# allow user to change password once without current_password
# @resource.allow_password_change = true;
@resource.allow_password_change = true;!
yield @resource if block_given?
class AddAllowPasswordChangeToAccounts < ActiveRecord::Migration[5.0]
def change
add_column :accounts, :allow_password_change, :boolean, default: false
......@@ -10,7 +10,7 @@
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180511112959) do
ActiveRecord::Schema.define(version: 20180712120040) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -31,6 +31,7 @@ ActiveRecord::Schema.define(version: 20180511112959) do
t.json "tokens"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "allow_password_change", default: false
t.index ["reset_password_token"], name: "index_accounts_on_reset_password_token", unique: true, using: :btree
t.index ["uid"], name: "index_accounts_on_uid", unique: true, using: :btree
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment