<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">Other Airflow 2 version (please specify below)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">airflow 2.4.1</p>
<p dir="auto">a existing user only have the role Viewer<br>
I add with the UI the role Admin<br>
click on button save</p>
<p dir="auto">then error -&gt;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
[03/Nov/2022:01:28:08 +0000] &quot;POST /XXXXXXXX/users/edit/2 HTTP/1.1&quot; 302 307 &quot;https://XXXXXXXXXXXXX.net/XXXXXXXX/users/edit/2&quot; &quot;Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0&quot;
[2022-11-03T01:28:09.014+0000] {app.py:1742} ERROR - Exception on /users/show/1 [GET]
Traceback (most recent call last):
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/flask/app.py&quot;, line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/flask/app.py&quot;, line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/flask/app.py&quot;, line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/flask/app.py&quot;, line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py&quot;, line 133, in wraps
    return f(self, *args, **kwargs)
  File &quot;/home/airflow/.local/lib/python3.7/site-packages/airflow/www/fab_security/views.py&quot;, line 222, in show
    widgets['show'].template_args['actions'].pop('userinfoedit')
KeyError: 'userinfoedit'"><pre lang="log" class="notranslate"><code class="notranslate">
[03/Nov/2022:01:28:08 +0000] "POST /XXXXXXXX/users/edit/2 HTTP/1.1" 302 307 "https://XXXXXXXXXXXXX.net/XXXXXXXX/users/edit/2" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0"
[2022-11-03T01:28:09.014+0000] {app.py:1742} ERROR - Exception on /users/show/1 [GET]
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 133, in wraps
    return f(self, *args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/www/fab_security/views.py", line 222, in show
    widgets['show'].template_args['actions'].pop('userinfoedit')
KeyError: 'userinfoedit'
</code></pre></div>
<h3 dir="auto">What you think should happen instead</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.4 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Official Apache Airflow Helm Chart</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">1.7.0</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.2</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">Under Security Tab&gt; List users, when show record button for an user is clicked, an error page with some exception - "KeyError: 'userinfoedit'" is returned.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/95294875/156978032-459254a2-988f-448b-84a4-d228baf834d5.png"><img src="https://user-images.githubusercontent.com/95294875/156978032-459254a2-988f-448b-84a4-d228baf834d5.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/95294875/156977666-309d1252-5a77-409e-8c56-cdc650050ccb.png"><img src="https://user-images.githubusercontent.com/95294875/156977666-309d1252-5a77-409e-8c56-cdc650050ccb.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">Expected page to show the User Info on clicking the show records icon.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">Click on show records for any user under list users in security tab.</p>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Virtualenv installation</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>