Skip to content

Commit

Permalink
[Fixed] Fixed issue with group permissions not working if user is in …
Browse files Browse the repository at this point in the history
…multiple groups fixes #9
  • Loading branch information
nfourtythree committed Jul 3, 2017
1 parent 045a894 commit 724cb3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "1.1.2",
"downloadUrl": "https://github.com/nfourtythree/SecureAssetDownload/archive/1.1.2.zip",
"date": "2017-07-03T09:10:00.111Z",
"notes": [
"[Fixed] Fixed issue with group permissions not working if user is in multiple groups"
]
},
{
"version": "1.1.1",
"downloadUrl": "https://github.com/nfourtythree/SecureAssetDownload/archive/1.1.1.zip",
Expand Down
2 changes: 1 addition & 1 deletion secureassetdownload/SecureAssetDownloadPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getName()

function getVersion()
{
return '1.1.1';
return '1.1.2';
}

function getDeveloper()
Expand Down
6 changes: 6 additions & 0 deletions secureassetdownload/services/SecureAssetDownloadService.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,15 @@ public function isDownloadAllowed(array $options = array())
}

$_returnGroupIdCheck = true;

foreach ($usersGroupIds as $_groupId) {
if (!$this->_checkInArray($_groupId, $options['userGroupId'])) {
$_returnGroupIdCheck = false;
} else {
// If we find an applicable group jump out so true validation doesn't
// get overwritten
$_returnGroupIdCheck = true;
break;
}
}

Expand Down

1 comment on commit 724cb3d

@admench
Copy link

@admench admench commented on 724cb3d Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your help on this matter!! Much appreciated :-)

Please sign in to comment.