From 3015a6182cd1eec94d3b1fae2f9281d676cf1be8 Mon Sep 17 00:00:00 2001 From: lyf Date: Sat, 24 Aug 2024 02:17:33 +0000 Subject: [PATCH] =?UTF-8?q?UserAuth=20SA=E4=BE=A7=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=BA=8B=E4=BB=B6=E6=B2=A1=E6=9C=89=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=EF=BC=8C=E9=9C=80=E8=A6=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=96=B9=E7=9A=84=E5=8F=91=E9=80=81=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=92=8C=E6=8E=A5=E6=94=B6=E6=96=B9=E7=9A=84=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lyf Change-Id: I80dfb12f3a2447bbd8453774e4db49cccecee0dd --- sa_profile/useriam.cfg | 4 +++- services/core/src/publish_event_adapter.cpp | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sa_profile/useriam.cfg b/sa_profile/useriam.cfg index 0954d0d9f..0e7c6c99b 100644 --- a/sa_profile/useriam.cfg +++ b/sa_profile/useriam.cfg @@ -19,7 +19,9 @@ "ohos.permission.ACCESS_SERVICE_DM", "ohos.permission.sec.ACCESS_UDID", "ohos.permission.MANAGE_SECURE_SETTINGS", - "ohos.permission.PERMISSION_USED_STATS" + "ohos.permission.PERMISSION_USED_STATS", + "ohos.permission.MANAGE_USER_IDM", + "ohos.permission.USE_USER_IDM" ], "permission_acls" : [ "ohos.permission.ACCESS_AUTH_RESPOOL", diff --git a/services/core/src/publish_event_adapter.cpp b/services/core/src/publish_event_adapter.cpp index f81ea00ee..9fb49afbc 100644 --- a/services/core/src/publish_event_adapter.cpp +++ b/services/core/src/publish_event_adapter.cpp @@ -32,10 +32,14 @@ const std::string USER_PIN_CREATED_EVENT = "USER_PIN_CREATED_EVENT"; const std::string USER_PIN_DELETED_EVENT = "USER_PIN_DELETED_EVENT"; const std::string USER_PIN_UPDATED_EVENT = "USER_PIN_UPDATED_EVENT"; const std::string USER_CREDENTIAL_UPDATED_EVENT = "USER_CREDENTIAL_UPDATED_EVENT"; +const std::string USERIAM_COMMON_EVENT_PERMISSION = "ohos.permission.USE_USER_IDM"; void PublishEvent(EventFwk::CommonEventData data) { EventFwk::CommonEventPublishInfo publishInfo; + std::vector permissions; + permissions.push_back(USERIAM_COMMON_EVENT_PERMISSION); + publishInfo.SetSubscriberPermissions(permissions); publishInfo.SetSticky(false); if (!EventFwk::CommonEventManager::PublishCommonEvent(data, publishInfo)) { IAM_LOGE("PublishCommonEvent failed, eventAction is %{public}s", data.GetWant().GetAction().c_str());