Debian Maintainer display, link, description

Add link and description(to show what DM means)
Also change [dm] to (DM).

[DMD] will be the only one between [].

Who allowed the upload still missing.
parent 8a659a48
......@@ -38,7 +38,7 @@
{% endif %}
{% for extra in developer.extra %}
<small>
[<a href="{{ extra.link }}" title="{{ extra.description }}">{{ extra.display }}</a>]
(<a href="{{ extra.link }}" title="{{ extra.description }}">{{ extra.display }}</a>)
</small>
{% endfor %}
{% endwith %}
......
......@@ -349,7 +349,13 @@ def _add_dmd_entry(extra, email):
def _add_dm_entry(extra, developer, package_name):
if package_name and developer and developer.is_debian_maintainer:
if package_name in developer.allowed_packages:
extra.append({'display': 'dm'})
extra.append(
{
'display': 'DM',
'description': 'Debian Maintainer upload allowed',
'link': 'https://ftp-master.debian.org/dm.txt'
}
)
def allow_package(stanza):
......
......@@ -694,7 +694,13 @@ class DebianContributorExtraTest(TestCase):
self.assertSequenceEqual(expected,
get_maintainer_extra('dummy@debian.org'))
# With a package name an extra item is in the response.
expected.append({'display': 'dm'})
expected.append(
{
'display': 'DM',
'description': 'Debian Maintainer upload allowed',
'link': 'https://ftp-master.debian.org/dm.txt'
}
)
self.assertSequenceEqual(
expected,
get_maintainer_extra('dummy@debian.org', 'package-name')
......@@ -723,7 +729,13 @@ class DebianContributorExtraTest(TestCase):
self.assertSequenceEqual(expected,
get_uploader_extra('dummy@debian.org'))
# With a package name an extra item is in the response.
expected.append({'display': 'dm'})
expected.append(
{
'display': 'DM',
'description': 'Debian Maintainer upload allowed',
'link': 'https://ftp-master.debian.org/dm.txt'
}
)
self.assertSequenceEqual(
expected,
get_uploader_extra('dummy@debian.org', 'package-name')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment