mirror of
https://gitee.com/openharmony/useriam_user_auth_framework
synced 2024-11-23 07:39:51 +00:00
!692 权限校验提到前面,保持相同,先校验systemapi限制,再校验access permission
Merge pull request !692 from liuhanxiong/master
This commit is contained in:
commit
b52c132cb8
@ -579,11 +579,6 @@ int32_t UserAuthService::CheckAuthWidgetParam(
|
||||
return INVALID_PARAMETERS;
|
||||
}
|
||||
|
||||
if (!IpcCommon::CheckPermission(*this, IS_SYSTEM_APP) &&
|
||||
(widgetParam.windowMode != WindowModeType::UNKNOWN_WINDOW_MODE)) {
|
||||
IAM_LOGE("normal app can't set window mode.");
|
||||
return INVALID_PARAMETERS;
|
||||
}
|
||||
if (widgetParam.windowMode == FULLSCREEN && CheckSingeFaceOrFinger(validType)) {
|
||||
IAM_LOGE("Single fingerprint or single face does not support full screen");
|
||||
return INVALID_PARAMETERS;
|
||||
@ -632,6 +627,12 @@ uint64_t UserAuthService::AuthWidget(int32_t apiVersion, const AuthParam &authPa
|
||||
static_cast<void>(IpcCommon::GetCallerName(*this, isBundleName, callerName));
|
||||
contextCallback->SetTraceCallerName(callerName);
|
||||
Attributes extraInfo;
|
||||
if (!IpcCommon::CheckPermission(*this, IS_SYSTEM_APP) &&
|
||||
(widgetParam.windowMode != WindowModeType::UNKNOWN_WINDOW_MODE)) {
|
||||
IAM_LOGE("normal app can't set window mode.");
|
||||
contextCallback->OnResult(INVALID_PARAMETERS, extraInfo);
|
||||
return BAD_CONTEXT_ID;
|
||||
}
|
||||
if (!IpcCommon::CheckPermission(*this, ACCESS_BIOMETRIC_PERMISSION)) {
|
||||
IAM_LOGE("CheckPermission failed");
|
||||
contextCallback->OnResult(CHECK_PERMISSION_FAILED, extraInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user