mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10136 from kinglozzer/fix-tests-10113
MNT Fix broken tests
This commit is contained in:
commit
e217a3d9cb
@ -1108,9 +1108,15 @@ if (class_exists(IsEqualCanonicalizing::class)) {
|
|||||||
$member = $this->cache_generatedMembers[$permCode];
|
$member = $this->cache_generatedMembers[$permCode];
|
||||||
} else {
|
} else {
|
||||||
// Generate group with these permissions
|
// Generate group with these permissions
|
||||||
$group = Group::create();
|
$group = Group::get()->filterAny([
|
||||||
$group->Title = "$permCode group";
|
'Code' => "$permCode-group",
|
||||||
$group->write();
|
'Title' => "$permCode group",
|
||||||
|
])->first();
|
||||||
|
if (!$group || !$group->exists()) {
|
||||||
|
$group = Group::create();
|
||||||
|
$group->Title = "$permCode group";
|
||||||
|
$group->write();
|
||||||
|
}
|
||||||
|
|
||||||
// Create each individual permission
|
// Create each individual permission
|
||||||
foreach ($permArray as $permArrayItem) {
|
foreach ($permArray as $permArrayItem) {
|
||||||
|
Loading…
Reference in New Issue
Block a user