mirror of https://github.com/jumpserver/jumpserver
[Update] 更新移动的model
parent
ad6d233c11
commit
924affd978
|
@ -10,8 +10,8 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
database_operations = [
|
||||
migrations.AlterModelTable(name='accesskey', table='autentication_accesskey'),
|
||||
migrations.AlterModelTable(name='privatetoken', table='autentication_privatetoken'),
|
||||
migrations.AlterModelTable(name='accesskey', table='authentication_accesskey'),
|
||||
migrations.AlterModelTable(name='privatetoken', table='authentication_privatetoken'),
|
||||
migrations.AlterModelTable(name='loginlog', table='audits_userloginlog'),
|
||||
]
|
||||
|
||||
|
|
|
@ -321,8 +321,7 @@ class User(AbstractUser):
|
|||
pass
|
||||
|
||||
def create_access_key(self):
|
||||
from . import AccessKey
|
||||
access_key = AccessKey.objects.create(user=self)
|
||||
access_key = self.access_keys.create()
|
||||
return access_key
|
||||
|
||||
@property
|
||||
|
@ -334,11 +333,6 @@ class User(AbstractUser):
|
|||
return True
|
||||
return False
|
||||
|
||||
def check_public_key(self, public_key):
|
||||
if self.ssh_public_key == public_key:
|
||||
return True
|
||||
return False
|
||||
|
||||
def avatar_url(self):
|
||||
admin_default = settings.STATIC_URL + "img/avatar/admin.png"
|
||||
user_default = settings.STATIC_URL + "img/avatar/user.png"
|
||||
|
|
Loading…
Reference in New Issue