From: hb.min Date: Sun, 14 Apr 2013 12:49:13 +0000 (+0900) Subject: Add checking privacy method for add-on SDK X-Git-Tag: accepted/tizen_2.1/20130425.034849~65^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1480daae9765133c3b31e557658b31d8d29d12d;p=framework%2Fosp%2Fappfw.git Add checking privacy method for add-on SDK Change-Id: I2d9269e5843a68a090e170fef59567075af43dd9 Signed-off-by: hb.min --- diff --git a/src/security/FSecAccessController.cpp b/src/security/FSecAccessController.cpp index bd13693..6801279 100644 --- a/src/security/FSecAccessController.cpp +++ b/src/security/FSecAccessController.cpp @@ -173,6 +173,9 @@ AccessController::CheckPrivilege(int privilege) goto CATCH; } + r = _AccessController::CheckPrivacy(privilegeInfo.GetAppId(), static_cast< _Privilege >(privilege)); + SysTryReturnResult(NID_SEC, r == E_SUCCESS, E_USER_NOT_CONSENTED, "The user blocks an application from calling the method."); + return r; CATCH: @@ -227,6 +230,9 @@ AccessController::CheckPrivilege(const String& privilege) goto CATCH; } + r = _AccessController::CheckPrivacy(privilegeInfo.GetAppId(), privilege); + SysTryReturnResult(NID_SEC, r == E_SUCCESS, E_USER_NOT_CONSENTED, "The user blocks an application from calling the method."); + return r; CATCH: @@ -294,6 +300,9 @@ AccessController::CheckPrivilege(const PackageId& packageId, const String& privi goto CATCH; } + r = _AccessController::CheckPrivacy(packageId, privilege); + SysTryReturnResult(NID_SEC, r == E_SUCCESS, E_USER_NOT_CONSENTED, "The user blocks an application from calling the method."); + return r; CATCH: diff --git a/src/security/inc/FSec_AccessController.h b/src/security/inc/FSec_AccessController.h index 438bd61..fbef449 100644 --- a/src/security/inc/FSec_AccessController.h +++ b/src/security/inc/FSec_AccessController.h @@ -156,6 +156,8 @@ private: static _PrivilegeManager* __pPrivilegeManager; + friend class AccessController; + }; // _AccessController }} // Tizen::Security