aboutsummaryrefslogtreecommitdiff
path: root/app/templates/packages/view.html
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-08 23:42:30 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-08 23:42:30 +0100
commit8dcbcd8b626fcade29f3bce8ab597de6380c7c6c (patch)
tree64ee19d9fd134fe1739d642c47e83b7420edcbd9 /app/templates/packages/view.html
parentd00428eb7ea08ab11d202015aef2c14c7dca906a (diff)
downloadcheatdb-8dcbcd8b626fcade29f3bce8ab597de6380c7c6c.tar.xz
Add ability for users to remove themselves as maintainers
Diffstat (limited to 'app/templates/packages/view.html')
-rw-r--r--app/templates/packages/view.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 3885aca..8be65fb 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -272,6 +272,13 @@
{{ user.display_name }}
</a>
{% endfor %}
+
+ {% if current_user in package.maintainers and not package.checkPerm(current_user, "EDIT_MAINTAINERS") %}
+ <form class="mt-2" method="post" action="{{ package.getRemoveSelfMaintainerURL() }}">
+ <input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
+ <input class="btn btn-sm btn-link p-0" type="submit" value="{{ _("Remove myself") }}" />
+ </form>
+ {% endif %}
</td>
</tr>
</table>