identities: make BaseIdentitiesStore retrieve its identity class from a class variable
This commit is contained in:
parent
0cf57685fe
commit
286222f7f6
|
@ -394,6 +394,7 @@ class BaseIdentitiesStore:
|
|||
Field('email', N_('Email'), required = True, size = 30) ]
|
||||
|
||||
username_regex = r'[a-zA-Z0-9.-]+$'
|
||||
identity_class = Identity
|
||||
|
||||
def create_password(self,for_account='unknown'):
|
||||
'''Create a new password for an user contained in this store'''
|
||||
|
@ -486,7 +487,7 @@ class BaseIdentitiesStore:
|
|||
return time.time()
|
||||
|
||||
def get_identity_class(cls):
|
||||
return Identity
|
||||
return cls.identity_class
|
||||
get_identity_class = classmethod(get_identity_class)
|
||||
|
||||
def administrators(self):
|
||||
|
|
Reference in New Issue