Add new login design

This commit is contained in:
Martin Lensment 2014-09-25 14:19:53 +03:00
parent 1f2c12d7da
commit a0592833a9
17 changed files with 64 additions and 13 deletions

View file

@ -1,5 +1,5 @@
class AddAdminToUsers < ActiveRecord::Migration
def change
add_column :users, :admin, :boolean
add_column :users, :admin, :boolean, default: false
end
end

View file

@ -0,0 +1,5 @@
class AddRegistrarToUsers < ActiveRecord::Migration
def change
add_column :users, :registrar_id, :integer
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140925085340) do
ActiveRecord::Schema.define(version: 20140925101927) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -192,13 +192,14 @@ ActiveRecord::Schema.define(version: 20140925085340) do
t.datetime "created_at"
t.datetime "updated_at"
t.string "email"
t.integer "sign_in_count", default: 0, null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.inet "current_sign_in_ip"
t.inet "last_sign_in_ip"
t.boolean "admin"
t.boolean "admin", default: false
t.string "identity_code"
t.integer "registrar_id"
end
end

View file

@ -25,3 +25,4 @@ elkdata = Registrar.where(
EppUser.where(username: 'elkdata', password: '8932iods', active: true, registrar: elkdata).first_or_create
User.where(username: 'gitlab', password: '12345', email: 'enquiries@gitlab.eu', admin: true, identity_code: '37810013855').first_or_create
User.where(username: 'zone', password: '54321', email: 'info-info@zone.ee', admin: false, identity_code: '37810010085', registrar_id: zone.id).first_or_create