Disable login per default.
This commit is contained in:
parent
c75f36e8b3
commit
d55b3ac0d9
3 changed files with 37 additions and 7 deletions
|
@ -463,6 +463,9 @@ returns
|
|||
end
|
||||
|
||||
def check_login
|
||||
if !self.login && self.email
|
||||
self.login = self.email
|
||||
end
|
||||
if self.login
|
||||
self.login = self.login.downcase
|
||||
check = true
|
||||
|
|
|
@ -500,7 +500,7 @@ class CreateObjectManager < ActiveRecord::Migration
|
|||
:data_option => {
|
||||
:type => 'text',
|
||||
:maxlength => 100,
|
||||
:null => false,
|
||||
:null => true,
|
||||
:autocapitalize => false,
|
||||
},
|
||||
:editable => false,
|
||||
|
@ -508,12 +508,7 @@ class CreateObjectManager < ActiveRecord::Migration
|
|||
:screens => {
|
||||
:signup => {},
|
||||
:invite_agent => {},
|
||||
:edit => {
|
||||
:Agent => {},
|
||||
:Admin => {
|
||||
:null => false,
|
||||
},
|
||||
},
|
||||
:edit => {},
|
||||
},
|
||||
:pending_migration => false,
|
||||
:position => 100,
|
||||
|
|
32
db/migrate/20140925000001_update_object_manager3.rb
Normal file
32
db/migrate/20140925000001_update_object_manager3.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
class UpdateObjectManager2 < ActiveRecord::Migration
|
||||
def up
|
||||
|
||||
ObjectManager::Attribute.add(
|
||||
:object => 'User',
|
||||
:name => 'login',
|
||||
:display => 'Login',
|
||||
:data_type => 'input',
|
||||
:data_option => {
|
||||
:type => 'text',
|
||||
:maxlength => 100,
|
||||
:null => true,
|
||||
:autocapitalize => false,
|
||||
},
|
||||
:editable => false,
|
||||
:active => true,
|
||||
:screens => {
|
||||
:signup => {},
|
||||
:invite_agent => {},
|
||||
:edit => {},
|
||||
},
|
||||
:pending_migration => false,
|
||||
:position => 100,
|
||||
:created_by_id => 1,
|
||||
:updated_by_id => 1,
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue