prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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.
  
  </issue>
  <code>
  [start of netbox/users/graphql/types.py]
  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 of netbox/users/graphql/types.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: 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]
  
verification_info: {"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"}]}