Skip to content

Commit 724cb3d

Browse files
committed
[Fixed] Fixed issue with group permissions not working if user is in multiple groups fixes #9
1 parent 045a894 commit 724cb3d

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

releases.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
[
2+
{
3+
"version": "1.1.2",
4+
"downloadUrl": "https://github.com/nfourtythree/SecureAssetDownload/archive/1.1.2.zip",
5+
"date": "2017-07-03T09:10:00.111Z",
6+
"notes": [
7+
"[Fixed] Fixed issue with group permissions not working if user is in multiple groups"
8+
]
9+
},
210
{
311
"version": "1.1.1",
412
"downloadUrl": "https://github.com/nfourtythree/SecureAssetDownload/archive/1.1.1.zip",

secureassetdownload/SecureAssetDownloadPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function getName()
1111

1212
function getVersion()
1313
{
14-
return '1.1.1';
14+
return '1.1.2';
1515
}
1616

1717
function getDeveloper()

secureassetdownload/services/SecureAssetDownloadService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,15 @@ public function isDownloadAllowed(array $options = array())
128128
}
129129

130130
$_returnGroupIdCheck = true;
131+
131132
foreach ($usersGroupIds as $_groupId) {
132133
if (!$this->_checkInArray($_groupId, $options['userGroupId'])) {
133134
$_returnGroupIdCheck = false;
135+
} else {
136+
// If we find an applicable group jump out so true validation doesn't
137+
// get overwritten
138+
$_returnGroupIdCheck = true;
139+
break;
134140
}
135141
}
136142

0 commit comments

Comments
 (0)