mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-26 13:18:38 +08:00
Add customizable unauthorized URL. Fixes #23
This commit is contained in:
@@ -106,6 +106,10 @@ def create_app(auth_config):
|
||||
def admin_or_editor():
|
||||
return render_template('index.html', content='Admin or Editor Page')
|
||||
|
||||
@app.route('/unauthorized')
|
||||
def unauthorized():
|
||||
return render_template('unauthorized.html')
|
||||
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{% include "_messages.html" %}
|
||||
{% include "_nav.html" %}
|
||||
<h1>You are not allowed to access the requested resouce</h1>
|
||||
Reference in New Issue
Block a user