diff options
| author | rubenwardy <rw@rubenwardy.com> | 2020-07-08 23:42:30 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2020-07-08 23:42:30 +0100 |
| commit | 8dcbcd8b626fcade29f3bce8ab597de6380c7c6c (patch) | |
| tree | 64ee19d9fd134fe1739d642c47e83b7420edcbd9 /app/templates | |
| parent | d00428eb7ea08ab11d202015aef2c14c7dca906a (diff) | |
| download | cheatdb-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.html | 1 | ||||
| -rw-r--r-- | app/templates/packages/view.html | 7 |
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> |
