Skip to content

Commit a624685

Browse files
committed
Rebase and lint
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
1 parent 0ad2dfb commit a624685

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

mcpgateway/admin.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4871,7 +4871,8 @@ async def admin_get_user_edit(
48714871
# Build Password Requirements HTML separately to avoid backslash issues inside f-strings
48724872
if settings.password_require_uppercase or settings.password_require_lowercase or settings.password_require_numbers or settings.password_require_special:
48734873
pr_lines = []
4874-
pr_lines.append(f""" <!-- Password Requirements -->
4874+
pr_lines.append(
4875+
f""" <!-- Password Requirements -->
48754876
<div class="bg-blue-50 dark:bg-blue-900 border border-blue-200 dark:border-blue-700 rounded-md p-4">
48764877
<div class="flex items-start">
48774878
<svg class="h-5 w-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5" viewBox="0 0 20 20" fill="currentColor">
@@ -4884,29 +4885,40 @@ async def admin_get_user_edit(
48844885
<span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span>
48854886
<span>At least {settings.password_min_length} characters long</span>
48864887
</div>
4887-
""")
4888+
"""
4889+
)
48884890
if settings.password_require_uppercase:
4889-
pr_lines.append("""
4891+
pr_lines.append(
4892+
"""
48904893
<div class="flex items-center" id="req-uppercase"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains uppercase letters (A-Z)</span></div>
4891-
""")
4894+
"""
4895+
)
48924896
if settings.password_require_lowercase:
4893-
pr_lines.append("""
4897+
pr_lines.append(
4898+
"""
48944899
<div class="flex items-center" id="req-lowercase"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains lowercase letters (a-z)</span></div>
4895-
""")
4900+
"""
4901+
)
48964902
if settings.password_require_numbers:
4897-
pr_lines.append("""
4903+
pr_lines.append(
4904+
"""
48984905
<div class="flex items-center" id="req-numbers"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains numbers (0-9)</span></div>
4899-
""")
4906+
"""
4907+
)
49004908
if settings.password_require_special:
4901-
pr_lines.append("""
4909+
pr_lines.append(
4910+
"""
49024911
<div class="flex items-center" id="req-special"><span class="inline-flex items-center justify-center w-4 h-4 bg-gray-400 text-white rounded-full text-xs mr-2">✗</span><span>Contains special characters (!@#$%^&amp;*(),.?&quot;:{{}}|&lt;&gt;)</span></div>
4903-
""")
4904-
pr_lines.append("""
4912+
"""
4913+
)
4914+
pr_lines.append(
4915+
"""
49054916
</div>
49064917
</div>
49074918
</div>
49084919
</div>
4909-
""")
4920+
"""
4921+
)
49104922
password_requirements_html = "".join(pr_lines)
49114923
else:
49124924
# Intentionally an empty string for HTML insertion when no requirements apply.

0 commit comments

Comments
 (0)