We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
User and group queries are not properly restricted via GraphQL API in v4.0.2 Re-Open
### Deployment Type

Self-hosted

### NetBox Version

v4.0.2

### Python Version

3.10

### Steps to Reproduce

This is is to re-opent #7814

Create New Group netbox-graphql. Don't add any permission to the group.
Add new user to the group
Login as new user
Access https://netbox/graphql

query {
  user_list{
    username
    password
    }
  }

Username and hash in password returned.



### Expected Behavior

Empty result retured because the user in a group without permission to Group/User view.

### Observed Behavior

All Username and hash in Database returned.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `netbox/users/graphql/types.py`
Content:
```
1 from typing import List
2 
3 import strawberry
4 import strawberry_django
5 from django.contrib.auth import get_user_model
6 from django.contrib.auth.models import Group
7 from strawberry import auto
8 from users import filtersets
9 from users.models import Group
10 from utilities.querysets import RestrictedQuerySet
11 from .filters import *
12 
13 __all__ = (
14     'GroupType',
15     'UserType',
16 )
17 
18 
19 @strawberry_django.type(
20     Group,
21     fields=['id', 'name'],
22     filters=GroupFilter
23 )
24 class GroupType:
25     pass
26 
27 
28 @strawberry_django.type(
29     get_user_model(),
30     fields=[
31         'id', 'username', 'password', 'first_name', 'last_name', 'email', 'is_staff',
32         'is_active', 'date_joined', 'groups',
33     ],
34     filters=UserFilter
35 )
36 class UserType:
37     groups: List[GroupType]
38
```
--- 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/netbox/users/graphql/types.py b/netbox/users/graphql/types.py
--- a/netbox/users/graphql/types.py
+++ b/netbox/users/graphql/types.py
@@ -1,13 +1,10 @@
 from typing import List
 
-import strawberry
 import strawberry_django
 from django.contrib.auth import get_user_model
-from django.contrib.auth.models import Group
-from strawberry import auto
-from users import filtersets
+
+from netbox.graphql.types import BaseObjectType
 from users.models import Group
-from utilities.querysets import RestrictedQuerySet
 from .filters import *
 
 __all__ = (
@@ -21,17 +18,16 @@
     fields=['id', 'name'],
     filters=GroupFilter
 )
-class GroupType:
+class GroupType(BaseObjectType):
     pass
 
 
 @strawberry_django.type(
     get_user_model(),
     fields=[
-        'id', 'username', 'password', 'first_name', 'last_name', 'email', 'is_staff',
-        'is_active', 'date_joined', 'groups',
+        'id', 'username', 'first_name', 'last_name', 'email', 'is_staff', 'is_active', 'date_joined', 'groups',
     ],
     filters=UserFilter
 )
-class UserType:
+class UserType(BaseObjectType):
     groups: List[GroupType]

{"golden_diff": "diff --git a/netbox/users/graphql/types.py b/netbox/users/graphql/types.py\n--- a/netbox/users/graphql/types.py\n+++ b/netbox/users/graphql/types.py\n@@ -1,13 +1,10 @@\n from typing import List\n \n-import strawberry\n import strawberry_django\n from django.contrib.auth import get_user_model\n-from django.contrib.auth.models import Group\n-from strawberry import auto\n-from users import filtersets\n+\n+from netbox.graphql.types import BaseObjectType\n from users.models import Group\n-from utilities.querysets import RestrictedQuerySet\n from .filters import *\n \n __all__ = (\n@@ -21,17 +18,16 @@\n     fields=['id', 'name'],\n     filters=GroupFilter\n )\n-class GroupType:\n+class GroupType(BaseObjectType):\n     pass\n \n \n @strawberry_django.type(\n     get_user_model(),\n     fields=[\n-        'id', 'username', 'password', 'first_name', 'last_name', 'email', 'is_staff',\n-        'is_active', 'date_joined', 'groups',\n+        'id', 'username', 'first_name', 'last_name', 'email', 'is_staff', 'is_active', 'date_joined', 'groups',\n     ],\n     filters=UserFilter\n )\n-class UserType:\n+class UserType(BaseObjectType):\n     groups: List[GroupType]\n", "issue": "User and group queries are not properly restricted via GraphQL API in v4.0.2 Re-Open\n### Deployment Type\n\nSelf-hosted\n\n### NetBox Version\n\nv4.0.2\n\n### Python Version\n\n3.10\n\n### Steps to Reproduce\n\nThis is is to re-opent #7814\r\n\r\nCreate New Group netbox-graphql. Don't add any permission to the group.\r\nAdd new user to the group\r\nLogin as new user\r\nAccess https://netbox/graphql\r\n\r\nquery {\r\n  user_list{\r\n    username\r\n    password\r\n    }\r\n  }\r\n\r\nUsername and hash in password returned.\r\n\r\n\n\n### Expected Behavior\n\nEmpty result retured because the user in a group without permission to Group/User view.\n\n### Observed Behavior\n\nAll Username and hash in Database returned.\n", "before_files": [{"content": "from typing import List\n\nimport strawberry\nimport strawberry_django\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom strawberry import auto\nfrom users import filtersets\nfrom users.models import Group\nfrom utilities.querysets import RestrictedQuerySet\nfrom .filters import *\n\n__all__ = (\n    'GroupType',\n    'UserType',\n)\n\n\n@strawberry_django.type(\n    Group,\n    fields=['id', 'name'],\n    filters=GroupFilter\n)\nclass GroupType:\n    pass\n\n\n@strawberry_django.type(\n    get_user_model(),\n    fields=[\n        'id', 'username', 'password', 'first_name', 'last_name', 'email', 'is_staff',\n        'is_active', 'date_joined', 'groups',\n    ],\n    filters=UserFilter\n)\nclass UserType:\n    groups: List[GroupType]\n", "path": "netbox/users/graphql/types.py"}], "after_files": [{"content": "from typing import List\n\nimport strawberry_django\nfrom django.contrib.auth import get_user_model\n\nfrom netbox.graphql.types import BaseObjectType\nfrom users.models import Group\nfrom .filters import *\n\n__all__ = (\n    'GroupType',\n    'UserType',\n)\n\n\n@strawberry_django.type(\n    Group,\n    fields=['id', 'name'],\n    filters=GroupFilter\n)\nclass GroupType(BaseObjectType):\n    pass\n\n\n@strawberry_django.type(\n    get_user_model(),\n    fields=[\n        'id', 'username', 'first_name', 'last_name', 'email', 'is_staff', 'is_active', 'date_joined', 'groups',\n    ],\n    filters=UserFilter\n)\nclass UserType(BaseObjectType):\n    groups: List[GroupType]\n", "path": "netbox/users/graphql/types.py"}]}