Compare commits

...

4 Commits

Author SHA1 Message Date
Josh Hawkins
35d91f5b24 change password button text 2025-12-16 08:02:27 -06:00
Nicolas Mowen
538ecc03fe Remove hwaccel arg as it is not used for encoding 2025-12-16 06:41:08 -07:00
Josh Hawkins
011ee32595 don't render actions menu if no options are available 2025-12-16 06:39:29 -06:00
Josh Hawkins
918373cb69 don't require old password for users with admin role when changing passwords 2025-12-16 06:19:48 -06:00
4 changed files with 29 additions and 10 deletions

View File

@ -893,13 +893,9 @@ async def update_password(
except DoesNotExist:
return JSONResponse(content={"message": "User not found"}, status_code=404)
# Require old_password when:
# 1. Non-admin user is changing another user's password (admin only action)
# 2. Any user is changing their own password
is_changing_own_password = current_username == username
is_non_admin = current_role != "admin"
if is_changing_own_password or is_non_admin:
# Require old_password when non-admin user is changing any password
# Admin users changing passwords do NOT need to provide the current password
if current_role != "admin":
if not body.old_password:
return JSONResponse(
content={"message": "Current password is required"},

View File

@ -153,7 +153,7 @@ PRESETS_HW_ACCEL_ENCODE_BIRDSEYE = {
FFMPEG_HWACCEL_VAAPI: "{0} -hide_banner -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device {3} {1} -c:v h264_vaapi -g 50 -bf 0 -profile:v high -level:v 4.1 -sei:v 0 -an -vf format=vaapi|nv12,hwupload {2}",
"preset-intel-qsv-h264": "{0} -hide_banner {1} -c:v h264_qsv -g 50 -bf 0 -profile:v high -level:v 4.1 -async_depth:v 1 {2}",
"preset-intel-qsv-h265": "{0} -hide_banner {1} -c:v h264_qsv -g 50 -bf 0 -profile:v main -level:v 4.1 -async_depth:v 1 {2}",
FFMPEG_HWACCEL_NVIDIA: "{0} -hide_banner {1} -hwaccel cuda -hwaccel_device {3} -c:v h264_nvenc -g 50 -profile:v high -level:v auto -preset:v p2 -tune:v ll {2}",
FFMPEG_HWACCEL_NVIDIA: "{0} -hide_banner {1} -c:v h264_nvenc -g 50 -profile:v high -level:v auto -preset:v p2 -tune:v ll {2}",
"preset-jetson-h264": "{0} -hide_banner {1} -c:v h264_nvmpi -profile high {2}",
"preset-jetson-h265": "{0} -hide_banner {1} -c:v h264_nvmpi -profile main {2}",
FFMPEG_HWACCEL_RKMPP: "{0} -hide_banner {1} -c:v h264_rkmpp -profile:v high {2}",

View File

@ -679,7 +679,7 @@
"desc": "Manage this Frigate instance's user accounts."
},
"addUser": "Add User",
"updatePassword": "Update Password",
"updatePassword": "Reset Password",
"toast": {
"success": {
"createUser": "User {{user}} created successfully",
@ -700,7 +700,7 @@
"role": "Role",
"noUsers": "No users found.",
"changeRole": "Change user role",
"password": "Password",
"password": "Reset Password",
"deleteUser": "Delete user"
},
"dialog": {

View File

@ -49,6 +49,29 @@ export default function DetailActionsMenu({
search.data?.type === "audio" ? null : [`review/event/${search.id}`],
);
// don't render menu at all if no options are available
const hasSemanticSearchOption =
config?.semantic_search.enabled &&
setSimilarity !== undefined &&
search.data?.type === "object";
const hasReviewItem = !!(reviewItem && reviewItem.id);
const hasAdminTriggerOption =
isAdmin &&
config?.semantic_search.enabled &&
search.data?.type === "object";
if (
!search.has_snapshot &&
!search.has_clip &&
!hasSemanticSearchOption &&
!hasReviewItem &&
!hasAdminTriggerOption
) {
return null;
}
return (
<DropdownMenu open={isOpen} onOpenChange={setIsOpen}>
<DropdownMenuTrigger>