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
05129889
Commit
05129889
authored
Jul 05, 2019
by
BaiJiangJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修复授权规则更新失败的bug
parent
423a487b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
asset_permission.py
apps/perms/forms/asset_permission.py
+1
-2
asset_permission_create_update.html
...perms/templates/perms/asset_permission_create_update.html
+0
-1
jumpserver.js
apps/static/js/jumpserver.js
+4
-1
No files found.
apps/perms/forms/asset_permission.py
View file @
05129889
...
...
@@ -34,7 +34,7 @@ class ActionField(forms.MultipleChoiceField):
class
AssetPermissionForm
(
OrgModelForm
):
action
=
ActionField
()
action
s
=
ActionField
()
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
()
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -73,7 +73,6 @@ class AssetPermissionForm(OrgModelForm):
'system_users'
:
forms
.
SelectMultiple
(
attrs
=
{
'class'
:
'select2'
,
'data-placeholder'
:
_
(
'System user'
)}
),
'actions'
:
forms
.
CheckboxSelectMultiple
()
}
labels
=
{
'nodes'
:
_
(
"Node"
),
...
...
apps/perms/templates/perms/asset_permission_create_update.html
View file @
05129889
...
...
@@ -159,7 +159,6 @@ $(document).ready(function () {
objectAttrsIsList
(
data
,
[
'users'
,
'user_groups'
,
'system_users'
,
'nodes'
,
'assets'
,
'actions'
]);
objectAttrsIsDatetime
(
data
,
[
'date_start'
,
'date_expired'
]);
objectAttrsIsBool
(
data
,
[
'is_active'
]);
console
.
log
(
data
)
var
props
=
{
url
:
the_url
,
data
:
data
,
...
...
apps/static/js/jumpserver.js
View file @
05129889
...
...
@@ -1082,7 +1082,10 @@ function htmlEscape ( d ) {
function
objectAttrsIsList
(
obj
,
attrs
)
{
attrs
.
forEach
(
function
(
attr
)
{
if
(
obj
[
attr
]
&&
!
(
obj
[
attr
]
instanceof
Array
)){
if
(
!
obj
[
attr
]){
obj
[
attr
]
=
[]
}
else
if
(
obj
[
attr
]
&&
!
(
obj
[
attr
]
instanceof
Array
)){
obj
[
attr
]
=
[
obj
[
attr
]]
}
})
...
...
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