summaryrefslogtreecommitdiff
path: root/src/components/policy
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2017-08-18 23:00:29 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2017-08-21 15:59:12 +0300
commitf836fc40f0a1174dc83eee756ca3c2e51d760879 (patch)
tree2a2463a703b7ec9137d2bd33d18484f28f5e23a9 /src/components/policy
parentf27c9ad0c5226152e580219dde0b0f17042c83ca (diff)
downloadsdl_core-f836fc40f0a1174dc83eee756ca3c2e51d760879.tar.gz
Removes unused functionality from CheckAccess() interface
Diffstat (limited to 'src/components/policy')
-rw-r--r--src/components/policy/policy_external/include/policy/access_remote.h5
-rw-r--r--src/components/policy/policy_external/include/policy/policy_manager_impl.h4
-rw-r--r--src/components/policy/policy_external/src/policy_manager_impl.cc8
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h4
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc12
5 files changed, 6 insertions, 27 deletions
diff --git a/src/components/policy/policy_external/include/policy/access_remote.h b/src/components/policy/policy_external/include/policy/access_remote.h
index 07efe25682..4a98c61dbb 100644
--- a/src/components/policy/policy_external/include/policy/access_remote.h
+++ b/src/components/policy/policy_external/include/policy/access_remote.h
@@ -42,7 +42,7 @@ namespace policy_table = ::rpc::policy_table_interface_base;
namespace policy {
-enum TypeAccess { kDisallowed, kAllowed, kManual };
+enum TypeAccess { kDisallowed, kAllowed };
inline std::ostream& operator<<(std::ostream& output, TypeAccess x) {
output << "Access: ";
switch (x) {
@@ -52,9 +52,6 @@ inline std::ostream& operator<<(std::ostream& output, TypeAccess x) {
case kAllowed:
output << "ALLOWED";
break;
- case kManual:
- output << "MANUAL";
- break;
default:
output << "Error: Unknown type";
}
diff --git a/src/components/policy/policy_external/include/policy/policy_manager_impl.h b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
index 952aa5d32e..03de40191d 100644
--- a/src/components/policy/policy_external/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_external/include/policy/policy_manager_impl.h
@@ -391,9 +391,7 @@ class PolicyManagerImpl : public PolicyManager {
Permissions* data);
virtual TypeAccess CheckAccess(const PTString& device_id,
const PTString& app_id,
- const PTString& module,
- const PTString& rpc,
- const RemoteControlParams& params);
+ const PTString& module);
virtual bool CheckModule(const PTString& app_id, const PTString& module);
virtual void SetAccess(const PTString& dev_id,
const PTString& app_id,
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc
index 82ef7b8e6c..d37f43a515 100644
--- a/src/components/policy/policy_external/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_external/src/policy_manager_impl.cc
@@ -1982,13 +1982,7 @@ TypeAccess PolicyManagerImpl::CheckAccess(const PTString& device_id,
policy_table::ModuleType module_type;
bool is_valid = EnumFromJsonString(module, &module_type);
if (is_valid && access_remote_->CheckModuleType(app_id, module_type)) {
- if (access_remote_->IsPrimaryDevice(device_id)) {
- return TypeAccess::kAllowed;
- } else {
- Subject who = {device_id, app_id};
- Object what = {module_type};
- return CheckDriverConsent(who, what, rpc, params);
- }
+ return TypeAccess::kAllowed;
}
LOG4CXX_DEBUG(logger_, TypeAccess::kDisallowed);
return TypeAccess::kDisallowed;
diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
index 868328bcb4..f43f4a4809 100644
--- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
+++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h
@@ -362,9 +362,7 @@ class PolicyManagerImpl : public PolicyManager {
Permissions* data);
virtual TypeAccess CheckAccess(const PTString& device_id,
const PTString& app_id,
- const PTString& module,
- const PTString& rpc,
- const RemoteControlParams& params);
+ const PTString& module);
virtual bool CheckModule(const PTString& app_id, const PTString& module);
virtual void SetAccess(const PTString& dev_id,
const PTString& app_id,
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc
index e2cdbbf1c4..81f87fb73c 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -1205,22 +1205,14 @@ bool PolicyManagerImpl::GetHMITypes(const std::string& application_id,
TypeAccess PolicyManagerImpl::CheckAccess(const PTString& device_id,
const PTString& app_id,
- const PTString& module,
- const PTString& rpc,
- const RemoteControlParams& params) {
+ const PTString& module) {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "Module type: " << module);
policy_table::ModuleType module_type;
bool is_valid = EnumFromJsonString(module, &module_type);
if (is_valid && access_remote_->CheckModuleType(app_id, module_type)) {
- if (access_remote_->IsPrimaryDevice(device_id)) {
- return TypeAccess::kAllowed;
- } else {
- Subject who = {device_id, app_id};
- Object what = {module_type};
- return CheckDriverConsent(who, what, rpc, params);
- }
+ return TypeAccess::kAllowed;
}
LOG4CXX_DEBUG(logger_, TypeAccess::kDisallowed);
return TypeAccess::kDisallowed;