Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
8e6e4e6d
Commit
8e6e4e6d
authored
Apr 30, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a nice 403 page
parent
0636d2d9
Pipeline
#77
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
uitwww/__init__.py
uitwww/__init__.py
+4
-0
uitwww/templates/403.html
uitwww/templates/403.html
+42
-0
No files found.
uitwww/__init__.py
View file @
8e6e4e6d
...
@@ -67,6 +67,10 @@ def create_app(data_path):
...
@@ -67,6 +67,10 @@ def create_app(data_path):
nav
.
add_generator
(
"download-distros"
,
app
.
download
.
generate_navbar
)
nav
.
add_generator
(
"download-distros"
,
app
.
download
.
generate_navbar
)
nav
.
install
(
app
)
nav
.
install
(
app
)
@
app
.
errorhandler
(
403
)
def
forbidden
(
error
):
return
flask
.
render_template
(
"403.html"
),
403
@
app
.
errorhandler
(
404
)
@
app
.
errorhandler
(
404
)
def
not_found
(
error
):
def
not_found
(
error
):
return
flask
.
render_template
(
"404.html"
),
404
return
flask
.
render_template
(
"404.html"
),
404
...
...
uitwww/templates/403.html
0 → 100644
View file @
8e6e4e6d
{# Source code of the Ubuntu-it website
# Copyright (C) 2018 Pietro Albini
<pietroalbini
@
ubuntu
.
com
>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; witout even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see
<http:
//
www
.
gnu
.
org
/
licenses
/>
.
#}
{% extends "layout.html" %}
{% block title %}Accesso negato{% endblock %}
{% block content %}
<div
class=
"page"
>
<div
class=
"row"
>
<div
class=
"col"
>
<h1>
Accesso negato
</h1>
{% if g.auth_id %}
<p>
Il tuo gruppo non dispone dei permessi necessari per
visualizzare questa pagina.
</p>
{% else %}
<p>
Questa pagina è riservata ai membri di Ubuntu-it con
adeguati permessi.
<a
href=
"{{ url_for("
auth
.
login
")
}}"
>
Effettua l'accesso
</a>
per visualizzarla.
</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}
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