Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
0f715b83
Commit
0f715b83
authored
Nov 04, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #115 from pearkes/master
Respond with a 404 status code to inaccessible resources
parents
264c2b42
ce20c14b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
base.py
flask_admin/base.py
+2
-2
test_base.py
flask_admin/tests/test_base.py
+1
-1
No files found.
flask_admin/base.py
View file @
0f715b83
...
@@ -244,7 +244,7 @@ class BaseView(object):
...
@@ -244,7 +244,7 @@ class BaseView(object):
This method will be executed before calling any view method.
This method will be executed before calling any view method.
By default, it will check if admin class is accessible and if it is not - will
By default, it will check if admin class is accessible and if it is not - will
throw HTTP 40
3
error.
throw HTTP 40
4
error.
:param name:
:param name:
View function name
View function name
...
@@ -252,7 +252,7 @@ class BaseView(object):
...
@@ -252,7 +252,7 @@ class BaseView(object):
View function arguments
View function arguments
"""
"""
if
not
self
.
is_accessible
():
if
not
self
.
is_accessible
():
return
abort
(
40
3
)
return
abort
(
40
4
)
class
AdminIndexView
(
BaseView
):
class
AdminIndexView
(
BaseView
):
...
...
flask_admin/tests/test_base.py
View file @
0f715b83
...
@@ -178,7 +178,7 @@ def test_permissions():
...
@@ -178,7 +178,7 @@ def test_permissions():
view
.
allow_access
=
False
view
.
allow_access
=
False
rv
=
client
.
get
(
'/admin/mockview/'
)
rv
=
client
.
get
(
'/admin/mockview/'
)
eq_
(
rv
.
status_code
,
40
3
)
eq_
(
rv
.
status_code
,
40
4
)
def
test_submenu
():
def
test_submenu
():
...
...
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