[relationships] use permission to check if editable

This commit is contained in:
discomrade 2024-07-15 01:33:07 +00:00 committed by Shish
parent eeef6da955
commit c83401d43b

View file

@ -66,7 +66,7 @@ class RelationshipsTheme extends Themelet
return SHM_POST_INFO(
"Parent",
strval($image['parent_id']) ?: "None",
!$user->is_anonymous() ? INPUT(["type" => "number", "name" => "parent", "value" => $image['parent_id']]) : null
$user->can(Permissions::EDIT_IMAGE_RELATIONSHIPS) ? INPUT(["type" => "number", "name" => "parent", "value" => $image['parent_id']]) : null
);
}