{% extends "master.html" %}

{% block title %}Home{% endblock %}
{% set tag = "admin" %}


{% block content %}

<h2>Admin section</h2>

<ul>
  <li>
    <form action="{{ url_for('admin_generate_acl') }}" method="post">
    <input type="submit" class="submit positive button"
        value="Re-generate gitolite ACLs file">
    {{ form.csrf_token }}
    </form>
  </li>
  <li>
    <form action="{{ url_for('admin_refresh_ssh') }}" method="post">
    <input type="submit" class="submit positive button"
        value="Re-generate user ssh key files">
    {{ form.csrf_token }}
    </form>
  </li>
  <li>
    <form action="{{ url_for('admin_generate_hook_token') }}"
        method="post"
        onsubmit="return confirm('Are you sure to re-generate the hook-token'
            + ' of every projects?\nThis will break every web-hook in place '
            + 'and cannot be un-done.');">
    <input type="submit" class="submit positive button"
        value="Re-generate hook-token for every projects">
    {{ form.csrf_token }}
    </form>
    <p>
      This action can be used in case you need to change the hook-token for
      *all* the projects hosted on this pagure instance. This can be due to
      security reason. Beware that using it will break every web-hook
      consumer of every project hosted.
    </p>
  </li>
  <li>
    <a href="{{ url_for('group_lists') }}">
     Groups/Users management
    </a>
  </li>
</ul>

{% endblock %}
