From 9c032c3d855cb001926b80bf14529fd9fdd9fe69 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Oct 02 2018 15:43:56 +0000 Subject: [PATCH 1/4] Contact information added to Errors, fixes #3372 A new contact page template has been created, is linked in eact theme's footer The default contact page includes links to submit a bug, and contact the pagure lists Errors now include a link to the contact page to help users get help --- diff --git a/dev/ansible/roles/pagure-dev/files/pagure.cfg b/dev/ansible/roles/pagure-dev/files/pagure.cfg index 6640aac..714325f 100644 --- a/dev/ansible/roles/pagure-dev/files/pagure.cfg +++ b/dev/ansible/roles/pagure-dev/files/pagure.cfg @@ -97,7 +97,7 @@ SHORT_LENGTH = 6 ### or other BLACKLISTED_PROJECTS = [ 'static', 'pv', 'releases', 'new', 'api', 'settings', - 'logout', 'login', 'users', 'groups', 'projects'] + 'logout', 'login', 'users', 'groups', 'projects', 'contact'] ### IP addresses allowed to access the internal endpoints ### These endpoints are used by the milter and are security sensitive, thus diff --git a/pagure/contact.md b/pagure/contact.md new file mode 100644 index 0000000..1cd9476 --- /dev/null +++ b/pagure/contact.md @@ -0,0 +1,10 @@ +# Contact +--- + + + +If you experience a bug or security concern, please [submit an issue](https://pagure.io/pagure/issues). + +You may also post questions to the Pagure Development list by emailing: [pagure-devel@lists.pagure.io](mailto:pagure-devel@lists.pagure.io) or [subscribe to the list](https://lists.pagure.io/admin/lists/pagure-devel.lists.pagure.io/). + +[Subscribe to announcements](https://lists.pagure.io/admin/lists/pagure-announce.lists.pagure.io/) about Pagure. diff --git a/pagure/static/upload.js b/pagure/static/upload.js index 5d7e8ef..438968a 100644 --- a/pagure/static/upload.js +++ b/pagure/static/upload.js @@ -91,7 +91,7 @@ function doUpload(csrf_token, files) { if ( !text || text === "" ) { text = '

An error occured when uploading your file. Could it be ' + 'that it exceeds the maximum limit allowed?

' - + '

Please contact an admin if this problem persist or is ' + + '

Please contact an admin if this problem persist or is ' + 'blocking you. Thanks!

'; } var _elt = $('
' + text + '
'); diff --git a/pagure/templates/contact.html b/pagure/templates/contact.html new file mode 100644 index 0000000..133381f --- /dev/null +++ b/pagure/templates/contact.html @@ -0,0 +1,94 @@ +{% extends "master.html" %} + +{% block title %}About{% endblock %} +{% set tag = "about" %} + +{% from "_browseheader.html" import browse_header %} +{% from "_projectstring.html" import projectstring, projecticon %} + + +{% block header %} + +{% endblock %} + +{% block content %} + +
+ {{ content|safe }} +
+ +{% endblock %} + +{# {% block jscripts %} + {{ super() }} + + + +{% endblock %} #} diff --git a/pagure/templates/fatal_error.html b/pagure/templates/fatal_error.html index 073483e..306233a 100644 --- a/pagure/templates/fatal_error.html +++ b/pagure/templates/fatal_error.html @@ -14,6 +14,7 @@

With the message:

{{ error.description }}

+

Contact us to submit an issue or get help.

{% endif %} diff --git a/pagure/themes/chameleon/templates/theme.html b/pagure/themes/chameleon/templates/theme.html index b77ee1c..8b4ba39 100644 --- a/pagure/themes/chameleon/templates/theme.html +++ b/pagure/themes/chameleon/templates/theme.html @@ -37,6 +37,7 @@
Documentation • + Contact UsSSH Hostkey/Fingerprint
diff --git a/pagure/themes/default/templates/theme.html b/pagure/themes/default/templates/theme.html index 8aa2f70..7abd1e1 100644 --- a/pagure/themes/default/templates/theme.html +++ b/pagure/themes/default/templates/theme.html @@ -17,10 +17,10 @@ href="{{ url_for('theme.static', filename='favicon.ico')}}?version={{ g.version} {% endmacro %} {% macro browseheader_message(select) %} - {# + {# message that shows at the top of the browse pages: 'select' is the browse page. It can be either: 'projects', - 'users', or 'groups'. + 'users', or 'groups'. #} {% if select == 'projects' %}
@@ -42,7 +42,7 @@ href="{{ url_for('theme.static', filename='favicon.ico')}}?version={{ g.version} Pagure {{ g.version }}

-

SSH Hostkey/Fingerprint | Documentation

+

SSH Hostkey/Fingerprint | Documentation | Contact Us

© 2014-2018 Red Hat, Inc. and others.

diff --git a/pagure/themes/pagureio/templates/theme.html b/pagure/themes/pagureio/templates/theme.html index f06e008..b7c83de 100644 --- a/pagure/themes/pagureio/templates/theme.html +++ b/pagure/themes/pagureio/templates/theme.html @@ -38,7 +38,7 @@ {% if config['APP_URL'] == 'https://stg.pagure.io/' %}
- Welcome to the staging environment for pagure.io. + Welcome to the staging environment for pagure.io.
{% endif %} @@ -53,6 +53,7 @@
DocumentationFile an Issue • + Contact UsSSH Hostkey/Fingerprint
@@ -62,4 +63,4 @@ -{% endmacro %} \ No newline at end of file +{% endmacro %} diff --git a/pagure/themes/srcfpo/templates/theme.html b/pagure/themes/srcfpo/templates/theme.html index 02febe1..eb53702 100644 --- a/pagure/themes/srcfpo/templates/theme.html +++ b/pagure/themes/srcfpo/templates/theme.html @@ -88,6 +88,7 @@
DocumentationFile an Issue • + Contact UsSSH Hostkey/Fingerprint
diff --git a/pagure/ui/app.py b/pagure/ui/app.py index b49c908..8151156 100644 --- a/pagure/ui/app.py +++ b/pagure/ui/app.py @@ -14,6 +14,8 @@ from __future__ import unicode_literals import datetime import logging from math import ceil +import markdown +import os import flask from sqlalchemy.exc import SQLAlchemyError @@ -1489,3 +1491,26 @@ def force_logout(): flask.g.session.commit() flask.flash("All active sessions logged out") return flask.redirect(flask.url_for("ui_ns.user_settings")) + + +@UI_NS.route("/contact") +@UI_NS.route("/contact/") +def contact(): + """ A page to direct users to the appropriate places to get help. + """ + + if pagure_config.get("CONTACT_PAGE_PATH"): + file_path = pagure_config["CONTACT_PAGE_PATH"] + + else: + file_path = os.path.join( + os.path.abspath(os.path.dirname(__file__)), "..", "contact.md" + ) + + with open(file_path) as file: + content = file.read() + + return flask.render_template( + "contact.html", + content=markdown.markdown(content) + ) diff --git a/pagure/ui/fas_login.py b/pagure/ui/fas_login.py index a11cc16..86c5583 100644 --- a/pagure/ui/fas_login.py +++ b/pagure/ui/fas_login.py @@ -13,6 +13,7 @@ from __future__ import unicode_literals import logging import flask +from flask import Markup from sqlalchemy.exc import SQLAlchemyError @@ -115,9 +116,12 @@ def set_user(return_url): except SQLAlchemyError as err: flask.g.session.rollback() _log.exception(err) + message = Markup( + 'Could not set up you as a user properly,' + ' please contact an administrator' + ) flask.flash( - "Could not set up you as a user properly, please contact " - "an admin", + message, "error", ) # Ensure the user is logged out if we cannot set them up diff --git a/pagure/ui/oidc_login.py b/pagure/ui/oidc_login.py index f746b04..d818691 100644 --- a/pagure/ui/oidc_login.py +++ b/pagure/ui/oidc_login.py @@ -13,6 +13,7 @@ from __future__ import unicode_literals import logging import flask +from flask import Markup import munch from sqlalchemy.exc import SQLAlchemyError @@ -131,9 +132,12 @@ def set_user(): except SQLAlchemyError as err: flask.g.session.rollback() _log.exception(err) + message = Markup( + 'Could not set up you as a user properly,' + ' please contact an administrator' + ) flask.flash( - "Could not set up you as a user properly, please contact " - "an admin", + message, "error", ) # Ensure the user is logged out if we cannot set them up diff --git a/pagure/ui/plugins.py b/pagure/ui/plugins.py index ea35c4a..6cdd638 100644 --- a/pagure/ui/plugins.py +++ b/pagure/ui/plugins.py @@ -16,6 +16,8 @@ from __future__ import unicode_literals import logging import flask +from flask import Markup + from sqlalchemy.exc import SQLAlchemyError import pagure.exceptions @@ -126,8 +128,12 @@ def view_plugin(repo, plugin, username=None, namespace=None, full=True): except SQLAlchemyError as err: # pragma: no cover flask.g.session.rollback() _log.exception("Could not add plugin %s", plugin.name) + message = Markup( + 'Could not add plugin,' + ' please contact an administrator' + ) flask.flash( - "Could not add plugin %s, please contact an admin" + message % plugin.name ) diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index e2635e4..aab7ace 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -27,6 +27,7 @@ import re from math import ceil import flask +from flask import Markup import pygit2 import kitchen.text.converters as ktc import six @@ -2384,8 +2385,13 @@ def revoke_api_token(repo, token_id, username=None, namespace=None): except SQLAlchemyError as err: # pragma: no cover flask.g.session.rollback() _log.exception(err) + message = Markup( + 'Token could not be revoked,' + ' please contact an administrator' + ) flask.flash( - "Token could not be revoked, please contact an admin", "error" + message, + "error" ) return flask.redirect( From 50b2d4a4ab32afc770cacab6f42af654a4ad8e3e Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Oct 02 2018 21:23:57 +0000 Subject: [PATCH 2/4] moved contact.md to new about_page theme macro --- diff --git a/dev/ansible/roles/pagure-dev/files/pagure.cfg b/dev/ansible/roles/pagure-dev/files/pagure.cfg index 714325f..c1fa516 100644 --- a/dev/ansible/roles/pagure-dev/files/pagure.cfg +++ b/dev/ansible/roles/pagure-dev/files/pagure.cfg @@ -97,7 +97,7 @@ SHORT_LENGTH = 6 ### or other BLACKLISTED_PROJECTS = [ 'static', 'pv', 'releases', 'new', 'api', 'settings', - 'logout', 'login', 'users', 'groups', 'projects', 'contact'] + 'logout', 'login', 'users', 'groups', 'projects', 'about'] ### IP addresses allowed to access the internal endpoints ### These endpoints are used by the milter and are security sensitive, thus diff --git a/doc/configuration.rst b/doc/configuration.rst index eb35b98..e3b96cc 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -836,7 +836,7 @@ Defaults to: [ 'static', 'pv', 'releases', 'new', 'api', 'settings', - 'logout', 'login', 'users', 'groups' + 'logout', 'login', 'users', 'groups', 'about' ] diff --git a/doc/usage/theming.rst b/doc/usage/theming.rst index 2daf8c1..2d1d4fb 100644 --- a/doc/usage/theming.rst +++ b/doc/usage/theming.rst @@ -148,7 +148,7 @@ this needs to be included in this macro in your theme. Example: ###################### An optional Jinja macro that defines the welcome message that is shown -above the tabs on the Browse Pages (Projects, Users, and Groups). The +above the tabs on the Browse Pages (Projects, Users, and Groups). The select parameter is a string with the name of the page being shown Example: @@ -187,3 +187,21 @@ A Jinja macro that defines the footer of the Pagure site. Example: {% endmacro %} + + +`about_page()` macro +###################### + +A Jinja macro that defines the content of the About page (available at /about). You may want to replace the links to contact links for your own instance. Example: + +:: + + {% macro about_page() %} +
+

About

+

This is an instance of Pagure, a decentralized git forge.

+

If you experience a bug or security concern, please submit an issue.

+

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

Subscribe to announcements about Pagure.

+
+ {% endmacro %} diff --git a/pagure/contact.md b/pagure/contact.md deleted file mode 100644 index 1cd9476..0000000 --- a/pagure/contact.md +++ /dev/null @@ -1,10 +0,0 @@ -# Contact ---- - - - -If you experience a bug or security concern, please [submit an issue](https://pagure.io/pagure/issues). - -You may also post questions to the Pagure Development list by emailing: [pagure-devel@lists.pagure.io](mailto:pagure-devel@lists.pagure.io) or [subscribe to the list](https://lists.pagure.io/admin/lists/pagure-devel.lists.pagure.io/). - -[Subscribe to announcements](https://lists.pagure.io/admin/lists/pagure-announce.lists.pagure.io/) about Pagure. diff --git a/pagure/static/upload.js b/pagure/static/upload.js index 438968a..b0d1a11 100644 --- a/pagure/static/upload.js +++ b/pagure/static/upload.js @@ -91,7 +91,7 @@ function doUpload(csrf_token, files) { if ( !text || text === "" ) { text = '

An error occured when uploading your file. Could it be ' + 'that it exceeds the maximum limit allowed?

' - + '

Please contact an admin if this problem persist or is ' + + '

Please contact an admin if this problem persist or is ' + 'blocking you. Thanks!

'; } var _elt = $('
' + text + '
'); diff --git a/pagure/templates/about.html b/pagure/templates/about.html new file mode 100644 index 0000000..28b7f50 --- /dev/null +++ b/pagure/templates/about.html @@ -0,0 +1,94 @@ +{% extends "master.html" %} + +{% block title %}About this Pagure Instance{% endblock %} +{% set tag = "help" %} + +{% from "_browseheader.html" import browse_header %} +{% from "_projectstring.html" import projectstring, projecticon %} + + +{% block header %} + +{% endblock %} + +{% block content %} + +
+ {{theme.about_page()}} +
+ +{% endblock %} + +{# {% block jscripts %} + {{ super() }} + + + +{% endblock %} #} diff --git a/pagure/templates/contact.html b/pagure/templates/contact.html deleted file mode 100644 index 133381f..0000000 --- a/pagure/templates/contact.html +++ /dev/null @@ -1,94 +0,0 @@ -{% extends "master.html" %} - -{% block title %}About{% endblock %} -{% set tag = "about" %} - -{% from "_browseheader.html" import browse_header %} -{% from "_projectstring.html" import projectstring, projecticon %} - - -{% block header %} - -{% endblock %} - -{% block content %} - -
- {{ content|safe }} -
- -{% endblock %} - -{# {% block jscripts %} - {{ super() }} - - - -{% endblock %} #} diff --git a/pagure/templates/fatal_error.html b/pagure/templates/fatal_error.html index 306233a..de99a63 100644 --- a/pagure/templates/fatal_error.html +++ b/pagure/templates/fatal_error.html @@ -14,7 +14,7 @@

With the message:

{{ error.description }}

-

Contact us to submit an issue or get help.

+

Contact us to submit an issue or get help.

{% endif %} diff --git a/pagure/themes/chameleon/templates/theme.html b/pagure/themes/chameleon/templates/theme.html index 8b4ba39..d0d6de3 100644 --- a/pagure/themes/chameleon/templates/theme.html +++ b/pagure/themes/chameleon/templates/theme.html @@ -37,7 +37,7 @@ @@ -47,3 +47,13 @@ {% endmacro %} + +{% macro about_page() %} +
+

About

+

This is an instance of Pagure, a decentralized git forge.

+

If you experience a bug or security concern, please submit an issue.

+

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

Subscribe to announcements about Pagure.

+
+{% endmacro %} diff --git a/pagure/themes/default/templates/theme.html b/pagure/themes/default/templates/theme.html index 7abd1e1..cfe106e 100644 --- a/pagure/themes/default/templates/theme.html +++ b/pagure/themes/default/templates/theme.html @@ -42,8 +42,18 @@ href="{{ url_for('theme.static', filename='favicon.ico')}}?version={{ g.version} Pagure {{ g.version }}

-

SSH Hostkey/Fingerprint | Documentation | Contact Us

+

SSH Hostkey/Fingerprint | Documentation | About this Instance

© 2014-2018 Red Hat, Inc. and others.

{% endmacro %} + +{% macro about_page() %} +
+

About

+

This is an instance of Pagure, a decentralized git forge.

+

If you experience a bug or security concern, please submit an issue.

+

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

Subscribe to announcements about Pagure.

+
+{% endmacro %} diff --git a/pagure/themes/pagureio/templates/theme.html b/pagure/themes/pagureio/templates/theme.html index b7c83de..0f9b0f2 100644 --- a/pagure/themes/pagureio/templates/theme.html +++ b/pagure/themes/pagureio/templates/theme.html @@ -53,7 +53,7 @@
DocumentationFile an Issue • - Contact Us • + About this InstanceSSH Hostkey/Fingerprint
@@ -64,3 +64,13 @@ {% endmacro %} + +{% macro about_page() %} +
+

About

+

This is an instance of Pagure, a decentralized git forge.

+

If you experience a bug or security concern, please submit an issue.

+

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

Subscribe to announcements about Pagure.

+
+{% endmacro %} diff --git a/pagure/themes/srcfpo/templates/theme.html b/pagure/themes/srcfpo/templates/theme.html index eb53702..12c79ba 100644 --- a/pagure/themes/srcfpo/templates/theme.html +++ b/pagure/themes/srcfpo/templates/theme.html @@ -88,7 +88,7 @@
DocumentationFile an Issue • - Contact Us • + About this InstanceSSH Hostkey/Fingerprint
@@ -99,3 +99,13 @@ {% endmacro %} + +{% macro about_page() %} +
+

About

+

This is an instance of Pagure, a decentralized git forge.

+

If you experience a bug or security concern, please submit an issue.

+

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

Subscribe to announcements about Pagure.

+
+{% endmacro %} diff --git a/pagure/ui/app.py b/pagure/ui/app.py index 8151156..4d40b01 100644 --- a/pagure/ui/app.py +++ b/pagure/ui/app.py @@ -1493,24 +1493,12 @@ def force_logout(): return flask.redirect(flask.url_for("ui_ns.user_settings")) -@UI_NS.route("/contact") -@UI_NS.route("/contact/") -def contact(): - """ A page to direct users to the appropriate places to get help. +@UI_NS.route("/about") +@UI_NS.route("/about/") +def help(): + """ A page to direct users to the appropriate places to get assistance, + or find basic instance information. """ - - if pagure_config.get("CONTACT_PAGE_PATH"): - file_path = pagure_config["CONTACT_PAGE_PATH"] - - else: - file_path = os.path.join( - os.path.abspath(os.path.dirname(__file__)), "..", "contact.md" - ) - - with open(file_path) as file: - content = file.read() - return flask.render_template( - "contact.html", - content=markdown.markdown(content) + "about.html", ) diff --git a/pagure/ui/fas_login.py b/pagure/ui/fas_login.py index 86c5583..58e6e2c 100644 --- a/pagure/ui/fas_login.py +++ b/pagure/ui/fas_login.py @@ -118,7 +118,7 @@ def set_user(return_url): _log.exception(err) message = Markup( 'Could not set up you as a user properly,' - ' please contact an administrator' + ' please contact an administrator' ) flask.flash( message, diff --git a/pagure/ui/oidc_login.py b/pagure/ui/oidc_login.py index d818691..1b5dbd1 100644 --- a/pagure/ui/oidc_login.py +++ b/pagure/ui/oidc_login.py @@ -134,7 +134,7 @@ def set_user(): _log.exception(err) message = Markup( 'Could not set up you as a user properly,' - ' please contact an administrator' + ' please contact an administrator' ) flask.flash( message, diff --git a/pagure/ui/plugins.py b/pagure/ui/plugins.py index 6cdd638..8886fbb 100644 --- a/pagure/ui/plugins.py +++ b/pagure/ui/plugins.py @@ -130,7 +130,7 @@ def view_plugin(repo, plugin, username=None, namespace=None, full=True): _log.exception("Could not add plugin %s", plugin.name) message = Markup( 'Could not add plugin,' - ' please contact an administrator' + ' please contact an administrator' ) flask.flash( message diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index aab7ace..f9c2b52 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -2387,7 +2387,7 @@ def revoke_api_token(repo, token_id, username=None, namespace=None): _log.exception(err) message = Markup( 'Token could not be revoked,' - ' please contact an administrator' + ' please contact an administrator' ) flask.flash( message, From 04a0dcd691a69d29c121f6e1e92d3426380581a6 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Oct 04 2018 17:51:09 +0000 Subject: [PATCH 3/4] removed unused code, changed about language, allowed admin_email to be set as a confguration --- diff --git a/doc/configuration.rst b/doc/configuration.rst index e3b96cc..46c5cca 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1126,6 +1126,14 @@ Defaults to: ``Pagure`` .. note: the welcome screen currently does not work with the `local` authentication. +ADMIN_EMAIL +~~~~~~~~~~~ + +This configuration key allows you to change the default administrator email +which is displayed on the "about" page. It can also be used elsewhere. + +Defaults to: ``pagure-devel@lists.pagure.io`` + USER_NAMESPACE ~~~~~~~~~~~~~~ diff --git a/doc/usage/theming.rst b/doc/usage/theming.rst index 2d1d4fb..578e6e2 100644 --- a/doc/usage/theming.rst +++ b/doc/usage/theming.rst @@ -199,7 +199,7 @@ A Jinja macro that defines the content of the About page (available at /about). {% macro about_page() %}

About

-

This is an instance of Pagure, a decentralized git forge.

+

This is an instance of Pagure, a git forge.

If you experience a bug or security concern, please submit an issue.

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

Subscribe to announcements about Pagure.

diff --git a/pagure/default_config.py b/pagure/default_config.py index 05b4c86..ca08c56 100644 --- a/pagure/default_config.py +++ b/pagure/default_config.py @@ -29,6 +29,9 @@ DB_URL = "sqlite:////var/tmp/pagure_dev.sqlite" # working with `local` auth) INSTANCE_NAME = "Pagure" +# Provide an email to contact an instance Administrator +ADMIN_EMAIL = "root@localhost.localdomain" + # url to datagrepper (optional): # DATAGREPPER_URL = 'https://apps.fedoraproject.org/datagrepper' # DATAGREPPER_CATEGORY = 'pagure' diff --git a/pagure/templates/about.html b/pagure/templates/about.html index 28b7f50..3379e7f 100644 --- a/pagure/templates/about.html +++ b/pagure/templates/about.html @@ -19,76 +19,3 @@
{% endblock %} - -{# {% block jscripts %} - {{ super() }} - - - -{% endblock %} #} diff --git a/pagure/themes/chameleon/templates/theme.html b/pagure/themes/chameleon/templates/theme.html index d0d6de3..835a424 100644 --- a/pagure/themes/chameleon/templates/theme.html +++ b/pagure/themes/chameleon/templates/theme.html @@ -51,9 +51,9 @@ {% macro about_page() %}

About

-

This is an instance of Pagure, a decentralized git forge.

+

This is an instance of Pagure, a git forge.

If you experience a bug or security concern, please submit an issue.

-

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

You may contact an administrator by emailing: {{ config['ADMIN_EMAIL'] }}.

Subscribe to announcements about Pagure.

{% endmacro %} diff --git a/pagure/themes/default/templates/theme.html b/pagure/themes/default/templates/theme.html index cfe106e..a4be810 100644 --- a/pagure/themes/default/templates/theme.html +++ b/pagure/themes/default/templates/theme.html @@ -51,9 +51,9 @@ href="{{ url_for('theme.static', filename='favicon.ico')}}?version={{ g.version} {% macro about_page() %}

About

-

This is an instance of Pagure, a decentralized git forge.

+

This is an instance of Pagure, a git forge.

If you experience a bug or security concern, please submit an issue.

-

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

You may contact an administrator by emailing: {{ config['ADMIN_EMAIL'] }}.

Subscribe to announcements about Pagure.

{% endmacro %} diff --git a/pagure/themes/pagureio/templates/theme.html b/pagure/themes/pagureio/templates/theme.html index 0f9b0f2..725fc2a 100644 --- a/pagure/themes/pagureio/templates/theme.html +++ b/pagure/themes/pagureio/templates/theme.html @@ -68,9 +68,9 @@ {% macro about_page() %}

About

-

This is an instance of Pagure, a decentralized git forge.

+

This is an instance of Pagure, a git forge.

If you experience a bug or security concern, please submit an issue.

-

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

You may contact an administrator by emailing: {{ config['ADMIN_EMAIL'] }}.

Subscribe to announcements about Pagure.

{% endmacro %} diff --git a/pagure/themes/srcfpo/templates/theme.html b/pagure/themes/srcfpo/templates/theme.html index 12c79ba..4ac17c9 100644 --- a/pagure/themes/srcfpo/templates/theme.html +++ b/pagure/themes/srcfpo/templates/theme.html @@ -103,9 +103,9 @@ {% macro about_page() %}

About

-

This is an instance of Pagure, a decentralized git forge.

+

This is an instance of Pagure, a git forge.

If you experience a bug or security concern, please submit an issue.

-

You may also post questions to the Pagure Development list by emailing: pagure-devel@lists.pagure.io or subscribe to the list.

+

You may contact an administrator by emailing: {{ config['ADMIN_EMAIL'] }}.

Subscribe to announcements about Pagure.

{% endmacro %} diff --git a/pagure/ui/app.py b/pagure/ui/app.py index 4d40b01..9f067e2 100644 --- a/pagure/ui/app.py +++ b/pagure/ui/app.py @@ -14,8 +14,6 @@ from __future__ import unicode_literals import datetime import logging from math import ceil -import markdown -import os import flask from sqlalchemy.exc import SQLAlchemyError diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index f9c2b52..17d7c8c 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -27,7 +27,6 @@ import re from math import ceil import flask -from flask import Markup import pygit2 import kitchen.text.converters as ktc import six @@ -2385,7 +2384,7 @@ def revoke_api_token(repo, token_id, username=None, namespace=None): except SQLAlchemyError as err: # pragma: no cover flask.g.session.rollback() _log.exception(err) - message = Markup( + message = flask.Markup( 'Token could not be revoked,' ' please contact an administrator' ) From 80b304ed39d0db2af26d4eaead8a06bd78c94f98 Mon Sep 17 00:00:00 2001 From: Mary Kate Fain Date: Oct 09 2018 13:18:02 +0000 Subject: [PATCH 4/4] remove estraneous code, fix default cfg docs --- diff --git a/doc/configuration.rst b/doc/configuration.rst index 46c5cca..5b56c5f 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1132,7 +1132,7 @@ ADMIN_EMAIL This configuration key allows you to change the default administrator email which is displayed on the "about" page. It can also be used elsewhere. -Defaults to: ``pagure-devel@lists.pagure.io`` +Defaults to: ``root@localhost.localdomain`` USER_NAMESPACE diff --git a/pagure/templates/about.html b/pagure/templates/about.html index 3379e7f..b61fb1d 100644 --- a/pagure/templates/about.html +++ b/pagure/templates/about.html @@ -1,16 +1,6 @@ {% extends "master.html" %} {% block title %}About this Pagure Instance{% endblock %} -{% set tag = "help" %} - -{% from "_browseheader.html" import browse_header %} -{% from "_projectstring.html" import projectstring, projecticon %} - - -{% block header %} - -{% endblock %} {% block content %}