Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.toolbox
Commits
4a8e10bf
Commit
4a8e10bf
authored
Sep 26, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: don't send 200 when login is bad.
parent
21cbde9d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
slapos/runner/static/js/scripts/login.js
slapos/runner/static/js/scripts/login.js
+8
-2
slapos/runner/views.py
slapos/runner/views.py
+1
-1
No files found.
slapos/runner/static/js/scripts/login.js
View file @
4a8e10bf
...
...
@@ -32,8 +32,14 @@ $(document).ready(function () {
$
(
"
#error
"
).
Popup
(
data
.
result
,
{
type
:
'
alert
'
,
duration
:
3000
});
}
})
.
error
(
function
()
{
$
(
"
#error
"
).
Popup
(
"
Cannot send your account identifier please try again!!
"
,
.
error
(
function
(
response
)
{
if
(
response
&&
response
.
status
===
401
)
{
$
(
"
#error
"
).
Popup
(
'
Login and/or password is incorrect.
'
,
{
type
:
'
alert
'
,
duration
:
3000
}
);
return
}
$
(
"
#error
"
).
Popup
(
"
Cannot send your account identifier
"
,
{
type
:
'
alert
'
,
duration
:
3000
});
})
.
complete
(
function
()
{
...
...
slapos/runner/views.py
View file @
4a8e10bf
...
...
@@ -106,7 +106,7 @@ def doLogin():
# Authenticate and log in!
if
g
.
users
[
username
].
authenticate
(
request
.
form
[
'cpwd'
]):
return
jsonify
(
code
=
1
,
result
=
""
)
return
jsonify
(
code
=
0
,
result
=
"Login or password is incorrect, please check it!"
)
return
jsonify
(
code
=
0
,
result
=
"Login or password is incorrect, please check it!"
)
,
401
# software views
@
login_required
()
...
...
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