Skip to content

Commit 8ce6b5a

Browse files
committed
Should fix #722
1 parent c5177ab commit 8ce6b5a

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

packages/web/lib/fog/system.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private static function _versionCompare()
5353
public function __construct()
5454
{
5555
self::_versionCompare();
56-
define('FOG_VERSION', '1.5.10.1695');
56+
define('FOG_VERSION', '1.5.10.1696');
5757
define('FOG_SCHEMA', 273);
5858
define('FOG_BCACHE_VER', 141);
5959
define('FOG_CLIENT_VERSION', '0.13.0');

packages/web/lib/plugins/accesscontrol/hooks/addaccesscontroluser.hook.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,23 +232,28 @@ public function userAddAccessControl($arguments)
232232
if (!in_array($sub, $subs)) {
233233
return;
234234
}
235+
$ac_setter = $_REQUEST['accesscontrol'];
236+
if (!$ac_setter) {
237+
return;
238+
}
235239
self::getClass('AccessControlAssociationManager')->destroy(
236240
array(
237-
'userID' => $arguments['User']->get('id')
241+
'userID' => $arguments['User']->get('id'),
242+
'accesscontrolID' => $ac_setter
238243
)
239244
);
240245
$cnt = self::getClass('AccessControlManager')
241246
->count(
242-
array('id' => $_REQUEST['accesscontrol'])
247+
array('id' => $ac_setter)
243248
);
244249
if ($cnt !== 1) {
245250
return;
246251
}
247-
$Role = new AccessControl($_REQUEST['accesscontrol']);
252+
$Role = new AccessControl($ac_setter);
248253
self::getClass('AccessControlAssociation')
249254
->set('userID', $arguments['User']->get('id'))
250255
->load('userID')
251-
->set('accesscontrolID', $_REQUEST['accesscontrol'])
256+
->set('accesscontrolID', $ac_setter)
252257
->set(
253258
'name',
254259
sprintf(

0 commit comments

Comments
 (0)