mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #303 from SilbinaryWolf/fix-changing-blog-pagetype
Fix bug where can't change 'Blog' page type to non-'Blog' page type
This commit is contained in:
commit
7bddc86ab4
@ -548,6 +548,8 @@ class Blog extends Page implements PermissionProvider {
|
|||||||
|
|
||||||
$group = $this->getUserGroup();
|
$group = $this->getUserGroup();
|
||||||
|
|
||||||
|
// Must check if the method exists or else an error occurs when changing page type
|
||||||
|
if ($this->hasMethod('Editors')) {
|
||||||
foreach(array($this->Editors(), $this->Writers(), $this->Contributors()) as $levels) {
|
foreach(array($this->Editors(), $this->Writers(), $this->Contributors()) as $levels) {
|
||||||
foreach($levels as $user) {
|
foreach($levels as $user) {
|
||||||
if(!$user->inGroup($group)) {
|
if(!$user->inGroup($group)) {
|
||||||
@ -556,6 +558,7 @@ class Blog extends Page implements PermissionProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or creates the group used to assign CMS access.
|
* Gets or creates the group used to assign CMS access.
|
||||||
|
Loading…
Reference in New Issue
Block a user