X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fapp%2FFAppSqlDataControl.cpp;h=66cb727ec763ca8b556c2ac3654cf5e9353ca354;hb=bc7a011bafd77e74b9f93ee0a6981825a06aa2ae;hp=a512047c8cfccf6c20a401a6887daecfa508e0a1;hpb=8fded89fc4d381b7502f3987727f8d26aa8467bd;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/src/app/FAppSqlDataControl.cpp b/src/app/FAppSqlDataControl.cpp index a512047..66cb727 100644 --- a/src/app/FAppSqlDataControl.cpp +++ b/src/app/FAppSqlDataControl.cpp @@ -25,9 +25,11 @@ #include #include "FApp_SqlDataControlImpl.h" +#include using namespace Tizen::Base; using namespace Tizen::Base::Collection; +using namespace Tizen::Security; namespace Tizen { namespace App { @@ -47,6 +49,9 @@ result SqlDataControl::Select(const String& dataId, const IList* pColumnList, const String* pWhere, const String *pOrder, RequestId& reqId, int pageNo, int countPerPage) { + result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER); + SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + SysTryReturnResult(NID_APP, __pSqlDataControlImpl, E_INVALID_STATE, "This instance has not been properly constructed."); @@ -57,6 +62,9 @@ result SqlDataControl::Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, RequestId& reqId) { + result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER); + SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + SysTryReturnResult(NID_APP, __pSqlDataControlImpl, E_INVALID_STATE, "This instance has not been properly constructed."); @@ -67,6 +75,9 @@ result SqlDataControl::Update(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& updateMap, const Tizen::Base::String* pWhere, RequestId& reqId) { + result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER); + SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + SysTryReturnResult(NID_APP, __pSqlDataControlImpl, E_INVALID_STATE, "This instance has not been properly constructed."); return __pSqlDataControlImpl->Update(dataId, updateMap, pWhere, reqId); @@ -75,6 +86,9 @@ SqlDataControl::Update(const Tizen::Base::String& dataId, const Tizen::Base::Col result SqlDataControl::Delete(const Tizen::Base::String& dataId, const Tizen::Base::String* pWhere, RequestId& reqId) { + result r = _AccessController::CheckUserPrivilege(_PRV_DATACONTROL_CONSUMER); + SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method."); + SysTryReturnResult(NID_APP, __pSqlDataControlImpl, E_INVALID_STATE, "This instance has not been properly constructed.");