From 7ec51d2bdc8977d985b44d3f6f74ee8a80ba56d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Kooman?= Date: Wed, 1 May 2019 20:20:25 +0200 Subject: [PATCH] do not list hidden profile in `/profile_list` API call --- CHANGES.md | 3 ++ composer.lock | 70 ++++++++++++++++++++++---------------------- src/VpnApiModule.php | 3 ++ 3 files changed, 41 insertions(+), 35 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 219f5341..c731a548 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # Changelog +## 2.0.2 (2019-05-01) +- do not list hidden profile in `/profile_list` API call + ## 2.0.1 (2019-04-26) - update tests to deal with updates internal API error messages (vpn-lib-common) diff --git a/composer.lock b/composer.lock index 91dc10ee..0bd6935a 100644 --- a/composer.lock +++ b/composer.lock @@ -160,11 +160,11 @@ }, { "name": "fkooman/php-saml-sp", - "version": "0.1.0", + "version": "0.1.1", "source": { "type": "git", "url": "https://git.tuxed.net/fkooman/php-saml-sp", - "reference": "d68c16dedc07b1a35377567c336373620fcfc254" + "reference": "fc90ce97ca34ae6ee31af168d169d705a95e6c22" }, "require": { "ext-date": "*", @@ -216,7 +216,7 @@ "email": "fkooman@tuxed.net", "source": "https://git.tuxed.net/fkooman/php-saml-sp" }, - "time": "2019-03-15T13:07:40+00:00" + "time": "2019-04-23T14:27:47+00:00" }, { "name": "fkooman/secookie", @@ -341,16 +341,16 @@ }, { "name": "lc/common", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/eduvpn/vpn-lib-common", - "reference": "e9c8a688c2c18966b978f29fb31e2ab8f97fa229" + "reference": "8fe3982198765f9875bb4902076bd2a46a54d43f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/eduvpn/vpn-lib-common/zipball/e9c8a688c2c18966b978f29fb31e2ab8f97fa229", - "reference": "e9c8a688c2c18966b978f29fb31e2ab8f97fa229", + "url": "https://api.github.com/repos/eduvpn/vpn-lib-common/zipball/8fe3982198765f9875bb4902076bd2a46a54d43f", + "reference": "8fe3982198765f9875bb4902076bd2a46a54d43f", "shasum": "" }, "require": { @@ -401,7 +401,7 @@ "email": "eduvpn@surfnet.nl", "source": "https://github.com/eduvpn/vpn-lib-common" }, - "time": "2019-04-01T20:26:29+00:00" + "time": "2019-04-26T09:29:21+00:00" }, { "name": "paragonie/constant_time_encoding", @@ -729,16 +729,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.8.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", - "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", + "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72", "shasum": "" }, "require": { @@ -773,7 +773,7 @@ "object", "object graph" ], - "time": "2018-06-11T23:09:50+00:00" + "time": "2019-04-07T13:18:21+00:00" }, { "name": "phar-io/manifest", @@ -933,16 +933,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -980,7 +980,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -1346,16 +1346,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.8", + "version": "7.5.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a" + "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c29c0525cf4572c11efe1db49a8b8aee9dfac58a", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/134669cf0eeac3f79bc7f0c793efbc158bffc160", + "reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160", "shasum": "" }, "require": { @@ -1426,7 +1426,7 @@ "testing", "xunit" ], - "time": "2019-03-26T13:23:54+00:00" + "time": "2019-04-19T15:50:46+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -1595,16 +1595,16 @@ }, { "name": "sebastian/environment", - "version": "4.1.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" + "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/3095910f0f0fb155ac4021fc51a4a7a39ac04e8a", + "reference": "3095910f0f0fb155ac4021fc51a4a7a39ac04e8a", "shasum": "" }, "require": { @@ -1619,7 +1619,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1644,7 +1644,7 @@ "environment", "hhvm" ], - "time": "2019-02-01T05:27:49+00:00" + "time": "2019-04-25T07:55:20+00:00" }, { "name": "sebastian/exporter", @@ -2039,7 +2039,7 @@ }, { "name": "Gert de Pagter", - "email": "backendtea@gmail.com" + "email": "BackEndTea@gmail.com" } ], "description": "Symfony polyfill for ctype functions", @@ -2054,16 +2054,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.1.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8", + "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8", "shasum": "" }, "require": { @@ -2090,7 +2090,7 @@ } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "time": "2019-04-04T09:56:43+00:00" }, { "name": "webmozart/assert", diff --git a/src/VpnApiModule.php b/src/VpnApiModule.php index 1b31d29e..c91842c5 100644 --- a/src/VpnApiModule.php +++ b/src/VpnApiModule.php @@ -85,6 +85,9 @@ function (Request $request, array $hookData) { $userProfileList = []; foreach ($profileList as $profileId => $profileData) { $profileConfig = new ProfileConfig($profileData); + if ($profileConfig->getItem('hideProfile')) { + continue; + } if ($profileConfig->getItem('enableAcl')) { // is the user member of the aclPermissionList? if (!VpnPortalModule::isMember($profileConfig->getSection('aclPermissionList')->toArray(), $userPermissions)) {