We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Delete bodhi.server.views.admin
Bodhi has a strange view that tells admin users what their username and principals are, but does not allow non-admin users to use it:

https://github.com/fedora-infra/bodhi/blob/3.0.0/bodhi/server/views/admin.py

When I visit https://bodhi.fedoraproject.org/admin/ I see:

```
{"principals": ["system.Everyone", "system.Authenticated", "bowlofeggs", "group:packager", "group:infra-sig", "group:bodhiadmin"], "user": "bowlofeggs"}
```

I don't know what the purpose of this view was, but I'm pretty sure we can delete it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bodhi/server/views/admin.py`
Content:
```
1 # Copyright © 2014-2017 Red Hat, Inc. and others
2 #
3 # This file is part of Bodhi.
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 """Define the admin view."""
19 
20 from cornice import Service
21 
22 from bodhi.server import log
23 from bodhi.server import security
24 
25 
26 admin_service = Service(name='admin', path='/admin/',
27                         description='Administrator view',
28                         factory=security.AdminACLFactory)
29 
30 
31 @admin_service.get(permission='admin')
32 def admin(request):
33     """
34     Return a dictionary with keys "user" and "principals".
35 
36     "user" indexes the current user's name, and "principals" indexes the user's effective
37     principals.
38 
39     Args:
40         request (pyramid.request): The current request.
41     Returns:
42         dict: A dictionary as described above.
43     """
44     user = request.user
45     log.info('%s logged into admin panel' % user.name)
46     principals = request.effective_principals
47     return {'user': user.name, 'principals': principals}
48
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/bodhi/server/views/admin.py b/bodhi/server/views/admin.py
deleted file mode 100644
--- a/bodhi/server/views/admin.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright © 2014-2017 Red Hat, Inc. and others
-#
-# This file is part of Bodhi.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-"""Define the admin view."""
-
-from cornice import Service
-
-from bodhi.server import log
-from bodhi.server import security
-
-
-admin_service = Service(name='admin', path='/admin/',
-                        description='Administrator view',
-                        factory=security.AdminACLFactory)
-
-
-@admin_service.get(permission='admin')
-def admin(request):
-    """
-    Return a dictionary with keys "user" and "principals".
-
-    "user" indexes the current user's name, and "principals" indexes the user's effective
-    principals.
-
-    Args:
-        request (pyramid.request): The current request.
-    Returns:
-        dict: A dictionary as described above.
-    """
-    user = request.user
-    log.info('%s logged into admin panel' % user.name)
-    principals = request.effective_principals
-    return {'user': user.name, 'principals': principals}

{"golden_diff": "diff --git a/bodhi/server/views/admin.py b/bodhi/server/views/admin.py\ndeleted file mode 100644\n--- a/bodhi/server/views/admin.py\n+++ /dev/null\n@@ -1,47 +0,0 @@\n-# Copyright \u00a9 2014-2017 Red Hat, Inc. and others\n-#\n-# This file is part of Bodhi.\n-#\n-# This program is free software; you can redistribute it and/or\n-# modify it under the terms of the GNU General Public License\n-# as published by the Free Software Foundation; either version 2\n-# of the License, or (at your option) any later version.\n-#\n-# This program is distributed in the hope that it will be useful,\n-# but WITHOUT ANY WARRANTY; without even the implied warranty of\n-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n-# GNU General Public License for more details.\n-#\n-# You should have received a copy of the GNU General Public License\n-# along with this program; if not, write to the Free Software\n-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n-\"\"\"Define the admin view.\"\"\"\n-\n-from cornice import Service\n-\n-from bodhi.server import log\n-from bodhi.server import security\n-\n-\n-admin_service = Service(name='admin', path='/admin/',\n-                        description='Administrator view',\n-                        factory=security.AdminACLFactory)\n-\n-\n-@admin_service.get(permission='admin')\n-def admin(request):\n-    \"\"\"\n-    Return a dictionary with keys \"user\" and \"principals\".\n-\n-    \"user\" indexes the current user's name, and \"principals\" indexes the user's effective\n-    principals.\n-\n-    Args:\n-        request (pyramid.request): The current request.\n-    Returns:\n-        dict: A dictionary as described above.\n-    \"\"\"\n-    user = request.user\n-    log.info('%s logged into admin panel' % user.name)\n-    principals = request.effective_principals\n-    return {'user': user.name, 'principals': principals}\n", "issue": "Delete bodhi.server.views.admin\nBodhi has a strange view that tells admin users what their username and principals are, but does not allow non-admin users to use it:\r\n\r\nhttps://github.com/fedora-infra/bodhi/blob/3.0.0/bodhi/server/views/admin.py\r\n\r\nWhen I visit https://bodhi.fedoraproject.org/admin/ I see:\r\n\r\n```\r\n{\"principals\": [\"system.Everyone\", \"system.Authenticated\", \"bowlofeggs\", \"group:packager\", \"group:infra-sig\", \"group:bodhiadmin\"], \"user\": \"bowlofeggs\"}\r\n```\r\n\r\nI don't know what the purpose of this view was, but I'm pretty sure we can delete it.\n", "before_files": [{"content": "# Copyright \u00a9 2014-2017 Red Hat, Inc. and others\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.\n\"\"\"Define the admin view.\"\"\"\n\nfrom cornice import Service\n\nfrom bodhi.server import log\nfrom bodhi.server import security\n\n\nadmin_service = Service(name='admin', path='/admin/',\n                        description='Administrator view',\n                        factory=security.AdminACLFactory)\n\n\n@admin_service.get(permission='admin')\ndef admin(request):\n    \"\"\"\n    Return a dictionary with keys \"user\" and \"principals\".\n\n    \"user\" indexes the current user's name, and \"principals\" indexes the user's effective\n    principals.\n\n    Args:\n        request (pyramid.request): The current request.\n    Returns:\n        dict: A dictionary as described above.\n    \"\"\"\n    user = request.user\n    log.info('%s logged into admin panel' % user.name)\n    principals = request.effective_principals\n    return {'user': user.name, 'principals': principals}\n", "path": "bodhi/server/views/admin.py"}], "after_files": [{"content": null, "path": "bodhi/server/views/admin.py"}]}