parent
6462a62060
commit
1579f3fb83
|
@ -0,0 +1,5 @@
|
||||||
|
RailsAdmin.config do |config|
|
||||||
|
config.authenticate_with do
|
||||||
|
redirect_to '/' unless signed_in? && current_user.admin?
|
||||||
|
end
|
||||||
|
end
|
|
@ -7,6 +7,7 @@ class DeviseCreateUsers < ActiveRecord::Migration
|
||||||
t.string :email, :null => false
|
t.string :email, :null => false
|
||||||
t.string :voice_number
|
t.string :voice_number
|
||||||
t.string :sms_number
|
t.string :sms_number
|
||||||
|
t.boolean :admin, :default => false
|
||||||
t.database_authenticatable :null => false
|
t.database_authenticatable :null => false
|
||||||
t.recoverable
|
t.recoverable
|
||||||
t.rememberable
|
t.rememberable
|
||||||
|
|
|
@ -60,6 +60,7 @@ ActiveRecord::Schema.define(:version => 4) do
|
||||||
t.string "email", :default => "", :null => false
|
t.string "email", :default => "", :null => false
|
||||||
t.string "voice_number"
|
t.string "voice_number"
|
||||||
t.string "sms_number"
|
t.string "sms_number"
|
||||||
|
t.boolean "admin", :default => false
|
||||||
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
||||||
t.string "reset_password_token"
|
t.string "reset_password_token"
|
||||||
t.string "remember_token"
|
t.string "remember_token"
|
||||||
|
|
Loading…
Reference in New Issue