aboutsummaryrefslogtreecommitdiff
path: root/app/templates
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
parentd00428eb7ea08ab11d202015aef2c14c7dca906a (diff)
downloadcheatdb-8dcbcd8b626fcade29f3bce8ab597de6380c7c6c.tar.xz
Add ability for users to remove themselves as maintainers
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/packages/edit_maintainers.html1
-rw-r--r--app/templates/packages/view.html7
2 files changed, 8 insertions, 0 deletions
diff --git a/app/templates/packages/edit_maintainers.html b/app/templates/packages/edit_maintainers.html
index 2c67e3b..db9a997 100644
--- a/app/templates/packages/edit_maintainers.html
+++ b/app/templates/packages/edit_maintainers.html
@@ -12,6 +12,7 @@
<p>
{{ _("Maintainers are given write access to the package.") }}
{{ _("Depending on their rank, they will be able to edit the package, create releases and screenshots, and read private threads.") }}
+ {{ _("Maintainers cannot add or remove other maintainers, but can remove themselves.") }}
</p>
<form method="POST" action="" class="tableform">
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>