mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-09-28 20:29:20 +02:00
BUGFIX Don't suggest members in SecurityAdmin->autocomplete() that the current user doesn't have rights to edit (fixes #5651) (from r110858)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112796 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
949d8b3cb1
commit
ad5a8e0fce
@ -259,7 +259,9 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
if($matches) {
|
||||
$result .= "<ul>";
|
||||
foreach($matches as $match) {
|
||||
if(!$match->canView()) continue;
|
||||
// If the current user doesnt have permissions on the target user,
|
||||
// he's not allowed to add it to a group either: Don't include it in the suggestions.
|
||||
if(!$match->canView() || !$match->canEdit()) continue;
|
||||
|
||||
$data = $match->FirstName;
|
||||
$data .= ",$match->Surname";
|
||||
|
Loading…
Reference in New Issue
Block a user