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
870b8631
Commit
870b8631
authored
Feb 27, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改设置的一些require
parent
9292e485
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
asset_list.html
apps/assets/templates/assets/asset_list.html
+1
-1
forms.py
apps/common/forms.py
+1
-1
user.py
apps/users/models/user.py
+4
-0
No files found.
apps/assets/templates/assets/asset_list.html
View file @
870b8631
...
...
@@ -415,7 +415,7 @@ $(document).ready(function(){
current_node
=
nodes
[
0
];
url
+=
"?node_id="
+
current_node
.
id
;
}
window
.
open
(
url
);
window
.
open
(
url
,
'_self'
);
})
.
on
(
'click'
,
'.btn_asset_delete'
,
function
()
{
var
$this
=
$
(
this
);
...
...
apps/common/forms.py
View file @
870b8631
...
...
@@ -71,7 +71,7 @@ class BasicSettingForm(BaseForm):
help_text
=
"eg: http://jumpserver.abc.com:8080"
)
USER_GUIDE_URL
=
forms
.
URLField
(
label
=
_
(
"User Guide URL"
),
label
=
_
(
"User Guide URL"
),
required
=
False
,
help_text
=
_
(
"User first login update profile done redirect to it"
)
)
EMAIL_SUBJECT_PREFIX
=
forms
.
CharField
(
...
...
apps/users/models/user.py
View file @
870b8631
...
...
@@ -151,6 +151,10 @@ class User(AbstractUser):
def
save
(
self
,
*
args
,
**
kwargs
):
if
not
self
.
name
:
self
.
name
=
self
.
username
if
self
.
username
==
'admin'
:
self
.
role
=
'Admin'
self
.
is_active
=
True
super
()
.
save
(
*
args
,
**
kwargs
)
@property
...
...
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