Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
0d3bde11
Commit
0d3bde11
authored
Aug 31, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User add confirmed
parent
c1437353
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
models.py
apps/users/models.py
+2
-0
views.py
apps/users/views.py
+1
-1
No files found.
apps/users/models.py
View file @
0d3bde11
...
@@ -113,6 +113,8 @@ class User(AbstractUser):
...
@@ -113,6 +113,8 @@ class User(AbstractUser):
private_key
=
models
.
CharField
(
max_length
=
5000
,
blank
=
True
,
verbose_name
=
'ssh私钥'
)
# ssh key max length 4096 bit
private_key
=
models
.
CharField
(
max_length
=
5000
,
blank
=
True
,
verbose_name
=
'ssh私钥'
)
# ssh key max length 4096 bit
public_key
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
verbose_name
=
'公钥'
)
public_key
=
models
.
CharField
(
max_length
=
1000
,
blank
=
True
,
verbose_name
=
'公钥'
)
comment
=
models
.
TextField
(
max_length
=
200
,
blank
=
True
,
verbose_name
=
'描述'
)
comment
=
models
.
TextField
(
max_length
=
200
,
blank
=
True
,
verbose_name
=
'描述'
)
confirmed
=
models
.
BooleanField
(
default
=
False
)
date_confirmed
=
models
.
DateField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'确认时间'
)
date_expired
=
models
.
DateTimeField
(
default
=
date_expired_default
,
blank
=
True
,
null
=
True
,
verbose_name
=
'有效期'
)
date_expired
=
models
.
DateTimeField
(
default
=
date_expired_default
,
blank
=
True
,
null
=
True
,
verbose_name
=
'有效期'
)
created_by
=
models
.
CharField
(
max_length
=
30
,
default
=
''
)
created_by
=
models
.
CharField
(
max_length
=
30
,
default
=
''
)
...
...
apps/users/views.py
View file @
0d3bde11
...
@@ -18,7 +18,7 @@ from django.contrib.auth import authenticate, login, logout
...
@@ -18,7 +18,7 @@ from django.contrib.auth import authenticate, login, logout
from
.models
import
User
,
UserGroup
from
.models
import
User
,
UserGroup
from
.forms
import
UserAddForm
,
UserUpdateForm
,
UserGroupForm
,
UserLoginForm
from
.forms
import
UserAddForm
,
UserUpdateForm
,
UserGroupForm
,
UserLoginForm
from
.utils
import
AdminUserRequiredMixin
from
.utils
import
AdminUserRequiredMixin
,
ssh_key_gen
logger
=
logging
.
getLogger
(
'jumpserver.users.views'
)
logger
=
logging
.
getLogger
(
'jumpserver.users.views'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment