Add application.launch privilege to AppControl::Stop()
[platform/framework/native/appfw.git] / src / app / FAppAppControl.cpp
index 0e993e1..447d748 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -91,6 +90,9 @@ AppControl::FindAndStart(const String& operationId, const String* pUriPattern, c
 result
 AppControl::Stop(void)
 {
+       result r = _AccessController::CheckUserPrivilege(_PRV_APPLICATION_LAUNCH);
+       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
        SysAssertf(__pAppControlImpl != null, "Instance is not constructed properly.");
        return __pAppControlImpl->Stop();
 }