Fix the boiler plate codes
[platform/framework/native/appfw.git] / src / app / FAppAppManager.cpp
index f578e32..177e2d7 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);
@@ -222,6 +221,9 @@ AppManager::TerminateApplication(const AppId& appId)
        SysTryReturnResult(NID_APP, appId.GetLength() <= WIDGET_APP_MAX_APPID_LENGTH, E_MAX_EXCEEDED,
                                                  "The length of appid exceeded the limit(%d).", WIDGET_APP_MAX_APPID_LENGTH);
 
+       result r = _AccessController::CheckUserPrivilege(_PRV_APPLICATION_KILL, _PRV_APPMANAGER_KILL);
+       SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
        return __pAppManagerImpl->TerminateApplication(appId);
 }