Compare commits

..

No commits in common. "35d91f5b244ecb70863d6fb17febc8f382103de8" and "ae0c1ca941a09bbe93dbc2c5739e6108361e4d10" have entirely different histories.

4 changed files with 10 additions and 29 deletions

View File

@ -893,9 +893,13 @@ async def update_password(
except DoesNotExist: except DoesNotExist:
return JSONResponse(content={"message": "User not found"}, status_code=404) return JSONResponse(content={"message": "User not found"}, status_code=404)
# Require old_password when non-admin user is changing any password # Require old_password when:
# Admin users changing passwords do NOT need to provide the current password # 1. Non-admin user is changing another user's password (admin only action)
if current_role != "admin": # 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:
if not body.old_password: if not body.old_password:
return JSONResponse( return JSONResponse(
content={"message": "Current password is required"}, 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}", 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-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}", "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} -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} -hwaccel cuda -hwaccel_device {3} -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-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}", "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}", 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." "desc": "Manage this Frigate instance's user accounts."
}, },
"addUser": "Add User", "addUser": "Add User",
"updatePassword": "Reset Password", "updatePassword": "Update Password",
"toast": { "toast": {
"success": { "success": {
"createUser": "User {{user}} created successfully", "createUser": "User {{user}} created successfully",
@ -700,7 +700,7 @@
"role": "Role", "role": "Role",
"noUsers": "No users found.", "noUsers": "No users found.",
"changeRole": "Change user role", "changeRole": "Change user role",
"password": "Reset Password", "password": "Password",
"deleteUser": "Delete user" "deleteUser": "Delete user"
}, },
"dialog": { "dialog": {

View File

@ -49,29 +49,6 @@ export default function DetailActionsMenu({
search.data?.type === "audio" ? null : [`review/event/${search.id}`], 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 ( return (
<DropdownMenu open={isOpen} onOpenChange={setIsOpen}> <DropdownMenu open={isOpen} onOpenChange={setIsOpen}>
<DropdownMenuTrigger> <DropdownMenuTrigger>