From c87ec99bac7d221c09cae145960d49be8771a6ce Mon Sep 17 00:00:00 2001 From: gaoqiang_strong Date: Mon, 9 Jun 2025 15:22:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AEuserid=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gaoqiang_strong --- commondependency/src/deviceprofile_connector.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commondependency/src/deviceprofile_connector.cpp b/commondependency/src/deviceprofile_connector.cpp index aebb45459..e09f87ac7 100644 --- a/commondependency/src/deviceprofile_connector.cpp +++ b/commondependency/src/deviceprofile_connector.cpp @@ -2682,16 +2682,17 @@ int32_t DeviceProfileConnector::UpdateAclDeviceName(const std::string &udid, con { std::vector allProfile = DeviceProfileConnector::GetInstance().GetAllAccessControlProfile(); + int32_t currentUserId = MultipleUserConnector::GetCurrentAccountUserID(); for (AccessControlProfile profile : allProfile) { Accessee acee = profile.GetAccessee(); - if (acee.GetAccesseeDeviceId() == udid) { + if (acee.GetAccesseeDeviceId() == udid && currentUserId == acee.GetAccesseeUserId()) { acee.SetAccesseeDeviceName(newDeviceName); profile.SetAccessee(acee); DistributedDeviceProfileClient::GetInstance().UpdateAccessControlProfile(profile); return DM_OK; } Accesser acer = profile.GetAccesser(); - if (acer.GetAccesserDeviceId() == udid) { + if (acer.GetAccesserDeviceId() == udid && currentUserId == acer.GetAccesserUserId()) { acer.SetAccesserDeviceName(newDeviceName); profile.SetAccesser(acer); DistributedDeviceProfileClient::GetInstance().UpdateAccessControlProfile(profile); -- Gitee