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
f9abf7af
Commit
f9abf7af
authored
Jan 10, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into guanghongwei
parents
94beae52
e5fe1333
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
views.py
jasset/views.py
+3
-3
No files found.
jasset/views.py
View file @
f9abf7af
...
...
@@ -7,7 +7,7 @@ from django.shortcuts import render_to_response
from
django.http
import
HttpResponseRedirect
from
django.core.paginator
import
Paginator
,
EmptyPage
,
PageNotAnInteger
from
models
import
IDC
,
Asset
,
Group
from
models
import
IDC
,
Asset
,
User
Group
from
connect
import
PyCrypt
,
KEY
...
...
@@ -20,7 +20,7 @@ def jadd(request):
groups
=
[]
cryptor
=
PyCrypt
(
KEY
)
eidc
=
IDC
.
objects
.
all
()
egroup
=
Group
.
objects
.
all
()
egroup
=
User
Group
.
objects
.
all
()
is_actived
=
{
'active'
:
1
,
'no_active'
:
0
}
login_typed
=
{
'LDAP'
:
'L'
,
'SSH_KEY'
:
'S'
,
'PASSWORD'
:
'P'
,
'MAP'
:
'M'
}
...
...
@@ -40,7 +40,7 @@ def jadd(request):
j_idc
=
IDC
.
objects
.
get
(
name
=
j_idc
)
for
group
in
j_group
:
c
=
Group
.
objects
.
get
(
name
=
group
)
c
=
User
Group
.
objects
.
get
(
name
=
group
)
groups
.
append
(
c
)
if
Asset
.
objects
.
filter
(
ip
=
str
(
j_ip
)):
...
...
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