prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  User on SouD should not be able to edit their user profile
  From @jamalex in bug bash: 
  The FacilityUser object is read-only for single-user certificates, so these changes will not be synced back. We had a spec doc that laid out "what should be allowed on a SoUD", I think this was documented in there — we should do an audit to make sure other cases are covered as well.
  
  https://www.notion.so/learningequality/CRITICAL-FEATURE-BUG-Users-on-SoUD-should-not-be-allowed-to-edit-their-user-profile-e5765979e7ed4fcaa694cfe7932ac4df
  
  </issue>
  <code>
  [start of kolibri/plugins/user_profile/kolibri_plugin.py]
  1 from __future__ import absolute_import
  2 from __future__ import print_function
  3 from __future__ import unicode_literals
  4 
  5 from kolibri.core.hooks import NavigationHook
  6 from kolibri.core.webpack import hooks as webpack_hooks
  7 from kolibri.plugins import KolibriPluginBase
  8 from kolibri.plugins.hooks import register_hook
  9 
  10 
  11 class UserProfile(KolibriPluginBase):
  12     translated_view_urls = "urls"
  13 
  14     @property
  15     def url_slug(self):
  16         return "profile"
  17 
  18 
  19 @register_hook
  20 class UserAuthAsset(webpack_hooks.WebpackBundleHook):
  21     bundle_id = "app"
  22 
  23 
  24 @register_hook
  25 class ProfileNavAction(NavigationHook):
  26     bundle_id = "user_profile_side_nav"
  27
  [end of kolibri/plugins/user_profile/kolibri_plugin.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/kolibri/plugins/user_profile/kolibri_plugin.py b/kolibri/plugins/user_profile/kolibri_plugin.py
  --- a/kolibri/plugins/user_profile/kolibri_plugin.py
  +++ b/kolibri/plugins/user_profile/kolibri_plugin.py
  @@ -2,6 +2,7 @@
   from __future__ import print_function
   from __future__ import unicode_literals
   
  +from kolibri.core.device.utils import get_device_setting
   from kolibri.core.hooks import NavigationHook
   from kolibri.core.webpack import hooks as webpack_hooks
   from kolibri.plugins import KolibriPluginBase
  @@ -20,6 +21,10 @@
   class UserAuthAsset(webpack_hooks.WebpackBundleHook):
       bundle_id = "app"
   
  +    @property
  +    def plugin_data(self):
  +        return {"isSubsetOfUsersDevice": get_device_setting("subset_of_users_device")}
  +
   
   @register_hook
   class ProfileNavAction(NavigationHook):
  
verification_info: {"golden_diff": "diff --git a/kolibri/plugins/user_profile/kolibri_plugin.py b/kolibri/plugins/user_profile/kolibri_plugin.py\n--- a/kolibri/plugins/user_profile/kolibri_plugin.py\n+++ b/kolibri/plugins/user_profile/kolibri_plugin.py\n@@ -2,6 +2,7 @@\n from __future__ import print_function\n from __future__ import unicode_literals\n \n+from kolibri.core.device.utils import get_device_setting\n from kolibri.core.hooks import NavigationHook\n from kolibri.core.webpack import hooks as webpack_hooks\n from kolibri.plugins import KolibriPluginBase\n@@ -20,6 +21,10 @@\n class UserAuthAsset(webpack_hooks.WebpackBundleHook):\n     bundle_id = \"app\"\n \n+    @property\n+    def plugin_data(self):\n+        return {\"isSubsetOfUsersDevice\": get_device_setting(\"subset_of_users_device\")}\n+\n \n @register_hook\n class ProfileNavAction(NavigationHook):\n", "issue": "User on SouD should not be able to edit their user profile\nFrom @jamalex in bug bash: \r\nThe FacilityUser object is read-only for single-user certificates, so these changes will not be synced back. We had a spec doc that laid out \"what should be allowed on a SoUD\", I think this was documented in there \u2014 we should do an audit to make sure other cases are covered as well.\r\n\r\nhttps://www.notion.so/learningequality/CRITICAL-FEATURE-BUG-Users-on-SoUD-should-not-be-allowed-to-edit-their-user-profile-e5765979e7ed4fcaa694cfe7932ac4df\n", "before_files": [{"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom kolibri.core.hooks import NavigationHook\nfrom kolibri.core.webpack import hooks as webpack_hooks\nfrom kolibri.plugins import KolibriPluginBase\nfrom kolibri.plugins.hooks import register_hook\n\n\nclass UserProfile(KolibriPluginBase):\n    translated_view_urls = \"urls\"\n\n    @property\n    def url_slug(self):\n        return \"profile\"\n\n\n@register_hook\nclass UserAuthAsset(webpack_hooks.WebpackBundleHook):\n    bundle_id = \"app\"\n\n\n@register_hook\nclass ProfileNavAction(NavigationHook):\n    bundle_id = \"user_profile_side_nav\"\n", "path": "kolibri/plugins/user_profile/kolibri_plugin.py"}]}