Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
do not list hidden profile in /profile_list API call
Browse files Browse the repository at this point in the history
  • Loading branch information
François Kooman committed May 1, 2019
1 parent bf952aa commit 7ec51d2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
70 changes: 35 additions & 35 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/VpnApiModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 7ec51d2

Please sign in to comment.