diff --git a/install/policies/phone.php b/install/policies/phone.php index 5a516763..d009c12f 100644 --- a/install/policies/phone.php +++ b/install/policies/phone.php @@ -50,4 +50,21 @@ 'is_android_system' => '1', 'is_apple_policy' => '0', ], + + [ + 'name' => __('Enable unknown sources', 'flyvemdm'), + 'symbol' => 'unknownAppSources', + 'group' => 'phone', + 'type' => 'bool', + 'type_data' => '', + 'unicity' => 1, + 'plugin_flyvemdm_policycategories_id' => $category, + 'comment' => __('Allow installation of apps from unknown sources', + 'flyvemdm'), + 'default_value' => '0', + 'recommended_value' => '0', + 'is_android_policy' => '1', + 'is_android_system' => '1', + 'is_apple_policy' => '0', + ], ]; \ No newline at end of file diff --git a/tests/suite-install/Config.php b/tests/suite-install/Config.php index e6d31e28..6309c8b6 100644 --- a/tests/suite-install/Config.php +++ b/tests/suite-install/Config.php @@ -117,7 +117,7 @@ public function testInstallPlugin() { // Test policies are populated $policy = new \PluginFlyvemdmPolicy(); $count = $dbUtils->countElementsInTable($policy::getTable()); - $this->integer($count)->isEqualTo(37); + $this->integer($count)->isEqualTo(38); // Take a snapshot of the database before any test $this->mysql_dump($DB->dbuser, $DB->dbhost, $DB->dbpassword, $DB->dbdefault, './save.sql'); diff --git a/tests/suite-unit/PluginFlyvemdmAgent.php b/tests/suite-unit/PluginFlyvemdmAgent.php index 687892bb..be0d439a 100644 --- a/tests/suite-unit/PluginFlyvemdmAgent.php +++ b/tests/suite-unit/PluginFlyvemdmAgent.php @@ -270,6 +270,7 @@ public function testGetTopicsToCleanup() { 'Policy/disableCreateVpnProfiles', 'Policy/inventoryFrequency', 'Policy/disableAllSounds', + 'Policy/unknownAppSources', ]; $topics = \PluginFlyvemdmAgent::getTopicsToCleanup();