| {#- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| -#} |
| {% set page="api_tickets" %} |
| {% extends 'allura:templates/site_admin.html' %} |
| |
| {% block content %} |
| <h1>Special API Tickets</h1> |
| <p>API Tickets give access to special APIs which should be used under supervision. |
| </p> |
| |
| <form name="ticket_form" method="POST"> |
| <table> |
| <tr> |
| <td>Username:</td> <td><input name="for_user" type="text" value="{{for_user}}"></td> |
| </tr> |
| <tr> |
| <td>Capabilities (JSON):</td> <td><input name="caps" type="text" value="{{caps}}"></td> |
| </tr> |
| <tr> |
| <td>Expiration date:</td> <td><input name="expires" type="text" value="{{expires}}"></td> |
| </tr> |
| <tr> |
| <td><input type="submit" value="Save"><td> |
| </tr> |
| </table> |
| </form> |
| |
| <table> |
| <tr> |
| <th>Username</th> |
| <th>Expiration Date</th> |
| <th>Capabilities</th> |
| </tr> |
| {% for token in token_list %} |
| <tr> |
| <td>{{token.user.username}}</td> |
| <td>{{token.expires}}</td> |
| <td>{{h.json.dumps(token.capabilities)}}</td> |
| <td></td> |
| </tr> |
| <tr> |
| <td colspan="3"> |
| API Ticket: {{token.api_key}}<br/> |
| Secret Key: {{token.secret_key}}</td> |
| </tr> |
| {% endfor %} |
| </table> |
| |
| {% endblock %} |