From: Bartlomiej Kunikowski Date: Wed, 24 Aug 2016 12:59:02 +0000 (+0200) Subject: Implement long-polling setting - check privilege X-Git-Tag: accepted/tizen/common/20160829.135936~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffed2fb48a6b6e2a030bd2bc352f8a632af5ac0e;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Implement long-polling setting - check privilege Requires: - https://review.tizen.org/gerrit/#/c/85303/ Change-Id: I9e856727bf240d6d407cea03976024ee18f643d0 --- diff --git a/src/wgt/step/security/step_check_settings_level.cc b/src/wgt/step/security/step_check_settings_level.cc index 270eb04..87f7702 100644 --- a/src/wgt/step/security/step_check_settings_level.cc +++ b/src/wgt/step/security/step_check_settings_level.cc @@ -25,6 +25,17 @@ bool ValidateSettingsForLevel(common_installer::PrivilegeLevel level, } LOG(INFO) << "Setting: 'background-vibration' allowed"; } + + if (settings.long_polling()) { + common_installer::PrivilegeLevel required_level = + common_installer::PrivilegeLevel::PARTNER; + if (!common_installer::SatifiesPrivilegeLevel(required_level, level)) { + LOG(ERROR) << "long-polling requires visibility level: " + << common_installer::PrivilegeLevelToString(required_level); + return false; + } + LOG(INFO) << "Setting: 'long-polling' allowed"; + } return true; }