mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX PHP 5.3 compat for referencing $this in closure, and make method public for same reason
sdf
This commit is contained in:
parent
df4648a308
commit
1cbf27e0f4
@ -1052,7 +1052,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
*
|
||||
* @return int[] List of group IDs
|
||||
*/
|
||||
protected function disallowedGroups() {
|
||||
public function disallowedGroups() {
|
||||
// unless the current user is an admin already OR the logged in user is an admin
|
||||
if (Permission::check('ADMIN') || Permission::checkMember($this, 'ADMIN')) {
|
||||
return array();
|
||||
@ -1476,7 +1476,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
if(Permission::check('EDIT_PERMISSIONS')) {
|
||||
// Filter allowed groups
|
||||
$groups = Group::get();
|
||||
$disallowedGroupIDs = $this->disallowedGroups();
|
||||
$disallowedGroupIDs = $self->disallowedGroups();
|
||||
if ($disallowedGroupIDs) {
|
||||
$groups = $groups->exclude('ID', $disallowedGroupIDs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user