mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
Update terminal api
This commit is contained in:
@@ -25,11 +25,9 @@ class AccessKey(models.Model):
|
||||
def get_secret(self):
|
||||
return str(self.secret)
|
||||
|
||||
def __unicode__(self):
|
||||
def __str__(self):
|
||||
return str(self.id)
|
||||
|
||||
__str__ = __unicode__
|
||||
|
||||
|
||||
class PrivateToken(Token):
|
||||
"""Inherit from auth token, otherwise migration is boring"""
|
||||
|
||||
@@ -23,9 +23,9 @@ __all__ = ['User']
|
||||
|
||||
class User(AbstractUser):
|
||||
ROLE_CHOICES = (
|
||||
('Admin', _('Administrator')),
|
||||
('User', _('User')),
|
||||
('App', _('Application'))
|
||||
('Admin', 'Administrator'),
|
||||
('User', 'User'),
|
||||
('App', 'Application')
|
||||
)
|
||||
|
||||
username = models.CharField(max_length=20, unique=True, verbose_name=_('Username'))
|
||||
|
||||
Reference in New Issue
Block a user