Build 2602260022: enterprise UI refresh and users bulk auto-search
This commit is contained in:
@@ -569,6 +569,17 @@ def set_user_auto_search_enabled(username: str, enabled: bool) -> None:
|
||||
)
|
||||
|
||||
|
||||
def set_auto_search_enabled_for_non_admin_users(enabled: bool) -> int:
|
||||
with _connect() as conn:
|
||||
cursor = conn.execute(
|
||||
"""
|
||||
UPDATE users SET auto_search_enabled = ? WHERE role != 'admin'
|
||||
""",
|
||||
(1 if enabled else 0,),
|
||||
)
|
||||
return cursor.rowcount
|
||||
|
||||
|
||||
def verify_user_password(username: str, password: str) -> Optional[Dict[str, Any]]:
|
||||
user = get_user_by_username(username)
|
||||
if not user:
|
||||
|
||||
Reference in New Issue
Block a user