mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Merge pull request #2904 from creative-commoners/pulls/5.1/limit-100
FIX Limit Member map to 100
This commit is contained in:
commit
665b208d89
@ -2246,7 +2246,16 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
};
|
};
|
||||||
$viewAllGroupsMap = $mapFn(Permission::get_groups_by_permission(['SITETREE_VIEW_ALL', 'ADMIN']));
|
$viewAllGroupsMap = $mapFn(Permission::get_groups_by_permission(['SITETREE_VIEW_ALL', 'ADMIN']));
|
||||||
$editAllGroupsMap = $mapFn(Permission::get_groups_by_permission(['SITETREE_EDIT_ALL', 'ADMIN']));
|
$editAllGroupsMap = $mapFn(Permission::get_groups_by_permission(['SITETREE_EDIT_ALL', 'ADMIN']));
|
||||||
$membersMap = Member::get()->map('ID', 'Name');
|
|
||||||
|
// $membersMap is limited to 100 records specifically so that it does not crash the front-end
|
||||||
|
// if the website has a large number of Members, which is likely to happen if the website also
|
||||||
|
// uses the Member table for non-cms public users
|
||||||
|
// This limit should be removed if the ListboxField front-end component is switched out or
|
||||||
|
// modified so that it does not load all users at once and instead uses XHR to fetch a subset
|
||||||
|
// of users based on what the user types in
|
||||||
|
$membersMap = Member::get()
|
||||||
|
->limit(100)
|
||||||
|
->map('ID', 'Name');
|
||||||
|
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
$rootTab = new TabSet(
|
$rootTab = new TabSet(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user