prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `kolibri/plugins/user_profile/kolibri_plugin.py`
  Content:
  ```
  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 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()
  
  ```
  
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"}], "after_files": [{"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom kolibri.core.device.utils import get_device_setting\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    @property\n    def plugin_data(self):\n        return {\"isSubsetOfUsersDevice\": get_device_setting(\"subset_of_users_device\")}\n\n\n@register_hook\nclass ProfileNavAction(NavigationHook):\n    bundle_id = \"user_profile_side_nav\"\n", "path": "kolibri/plugins/user_profile/kolibri_plugin.py"}]}