Add privilege checkers for actions 00/141000/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 27 Jul 2017 11:34:31 +0000 (20:34 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Thu, 27 Jul 2017 11:34:31 +0000 (20:34 +0900)
Change-Id: I98ac6db8874f655517bf21fa814ccc0fefaae759
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/server/JobManager.cpp

index 50b918e16c33198219cd7e0f3333d37a098b31a4..478f62a09b231f28322b242a2ebd4ee03d03fe0d 100644 (file)
@@ -374,7 +374,10 @@ void JobManager::__verifyAction(JobInfo* jobInfo, IClient* owner)
                IF_FAIL_RETURN(appControlAction->getAppControl(), false);
                return true;
        }();
-       if (verified) return;
+       if (verified) {
+               IF_FAIL_THROW(owner->hasPrivilege("http://tizen.org/privilege/appmanager.launch"), E_ACCESS);
+               return;
+       }
 
        // Notification
        verified = [&]()->bool {
@@ -384,7 +387,10 @@ void JobManager::__verifyAction(JobInfo* jobInfo, IClient* owner)
                IF_FAIL_RETURN(!(notiAction->getTitle().empty()), false);
                return true;
        }();
-       if (verified) return;
+       if (verified) {
+               IF_FAIL_THROW(owner->hasPrivilege("http://tizen.org/privilege/notification"), E_ACCESS);
+               return;
+       }
 
        // DBus Method
        verified = [&]()->bool {