We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add user principals to hello view
Along `user` info, show the list of user principals (for groups notably)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kinto/core/views/hello.py`
Content:
```
1 from pyramid.security import NO_PERMISSION_REQUIRED, Authenticated
2 
3 from kinto.core import Service
4 
5 hello = Service(name="hello", path='/', description="Welcome")
6 
7 
8 @hello.get(permission=NO_PERMISSION_REQUIRED)
9 def get_hello(request):
10     """Return information regarding the current instance."""
11     settings = request.registry.settings
12     project_name = settings['project_name']
13     project_version = settings['project_version']
14     data = dict(
15         project_name=project_name,
16         project_version=project_version,
17         http_api_version=settings['http_api_version'],
18         project_docs=settings['project_docs'],
19         url=request.route_url(hello.name)
20     )
21 
22     eos = get_eos(request)
23     if eos:
24         data['eos'] = eos
25 
26     data['settings'] = {}
27     public_settings = request.registry.public_settings
28     for setting in list(public_settings):
29         data['settings'][setting] = settings[setting]
30 
31     # If current user is authenticated, add user info:
32     # (Note: this will call authenticated_userid() with multiauth+groupfinder)
33     if Authenticated in request.effective_principals:
34         data['user'] = request.get_user_info()
35 
36     # Application can register and expose arbitrary capabilities.
37     data['capabilities'] = request.registry.api_capabilities
38 
39     return data
40 
41 
42 def get_eos(request):
43     return request.registry.settings['eos']
44
```
--- 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/kinto/core/views/hello.py b/kinto/core/views/hello.py
--- a/kinto/core/views/hello.py
+++ b/kinto/core/views/hello.py
@@ -32,6 +32,12 @@
     # (Note: this will call authenticated_userid() with multiauth+groupfinder)
     if Authenticated in request.effective_principals:
         data['user'] = request.get_user_info()
+        principals = request.effective_principals + [request.prefixed_userid]
+        prefix, user_id = request.prefixed_userid.split(':', 1)
+        # Remove unprefixed user id on effective_principals to avoid conflicts.
+        if user_id in principals:
+            principals.remove(user_id)
+        data['user']['principals'] = principals
 
     # Application can register and expose arbitrary capabilities.
     data['capabilities'] = request.registry.api_capabilities

{"golden_diff": "diff --git a/kinto/core/views/hello.py b/kinto/core/views/hello.py\n--- a/kinto/core/views/hello.py\n+++ b/kinto/core/views/hello.py\n@@ -32,6 +32,12 @@\n     # (Note: this will call authenticated_userid() with multiauth+groupfinder)\n     if Authenticated in request.effective_principals:\n         data['user'] = request.get_user_info()\n+        principals = request.effective_principals + [request.prefixed_userid]\n+        prefix, user_id = request.prefixed_userid.split(':', 1)\n+        # Remove unprefixed user id on effective_principals to avoid conflicts.\n+        if user_id in principals:\n+            principals.remove(user_id)\n+        data['user']['principals'] = principals\n \n     # Application can register and expose arbitrary capabilities.\n     data['capabilities'] = request.registry.api_capabilities\n", "issue": "Add user principals to hello view\nAlong `user` info, show the list of user principals (for groups notably)\n\n", "before_files": [{"content": "from pyramid.security import NO_PERMISSION_REQUIRED, Authenticated\n\nfrom kinto.core import Service\n\nhello = Service(name=\"hello\", path='/', description=\"Welcome\")\n\n\n@hello.get(permission=NO_PERMISSION_REQUIRED)\ndef get_hello(request):\n    \"\"\"Return information regarding the current instance.\"\"\"\n    settings = request.registry.settings\n    project_name = settings['project_name']\n    project_version = settings['project_version']\n    data = dict(\n        project_name=project_name,\n        project_version=project_version,\n        http_api_version=settings['http_api_version'],\n        project_docs=settings['project_docs'],\n        url=request.route_url(hello.name)\n    )\n\n    eos = get_eos(request)\n    if eos:\n        data['eos'] = eos\n\n    data['settings'] = {}\n    public_settings = request.registry.public_settings\n    for setting in list(public_settings):\n        data['settings'][setting] = settings[setting]\n\n    # If current user is authenticated, add user info:\n    # (Note: this will call authenticated_userid() with multiauth+groupfinder)\n    if Authenticated in request.effective_principals:\n        data['user'] = request.get_user_info()\n\n    # Application can register and expose arbitrary capabilities.\n    data['capabilities'] = request.registry.api_capabilities\n\n    return data\n\n\ndef get_eos(request):\n    return request.registry.settings['eos']\n", "path": "kinto/core/views/hello.py"}], "after_files": [{"content": "from pyramid.security import NO_PERMISSION_REQUIRED, Authenticated\n\nfrom kinto.core import Service\n\nhello = Service(name=\"hello\", path='/', description=\"Welcome\")\n\n\n@hello.get(permission=NO_PERMISSION_REQUIRED)\ndef get_hello(request):\n    \"\"\"Return information regarding the current instance.\"\"\"\n    settings = request.registry.settings\n    project_name = settings['project_name']\n    project_version = settings['project_version']\n    data = dict(\n        project_name=project_name,\n        project_version=project_version,\n        http_api_version=settings['http_api_version'],\n        project_docs=settings['project_docs'],\n        url=request.route_url(hello.name)\n    )\n\n    eos = get_eos(request)\n    if eos:\n        data['eos'] = eos\n\n    data['settings'] = {}\n    public_settings = request.registry.public_settings\n    for setting in list(public_settings):\n        data['settings'][setting] = settings[setting]\n\n    # If current user is authenticated, add user info:\n    # (Note: this will call authenticated_userid() with multiauth+groupfinder)\n    if Authenticated in request.effective_principals:\n        data['user'] = request.get_user_info()\n        principals = request.effective_principals + [request.prefixed_userid]\n        prefix, user_id = request.prefixed_userid.split(':', 1)\n        # Remove unprefixed user id on effective_principals to avoid conflicts.\n        if user_id in principals:\n            principals.remove(user_id)\n        data['user']['principals'] = principals\n\n    # Application can register and expose arbitrary capabilities.\n    data['capabilities'] = request.registry.api_capabilities\n\n    return data\n\n\ndef get_eos(request):\n    return request.registry.settings['eos']\n", "path": "kinto/core/views/hello.py"}]}