mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
BUG Fix comments tab appearing on pages without comments enabled
This commit is contained in:
parent
ad93c5c3ab
commit
138bbbfd84
@ -352,6 +352,10 @@ class CommentsExtension extends DataExtension {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function canModerateComments($member = null) {
|
public function canModerateComments($member = null) {
|
||||||
|
// Deny if not enabled for this object
|
||||||
|
if(!$this->owner->CommentsEnabled) return false;
|
||||||
|
|
||||||
|
// Fallback to can-edit
|
||||||
return $this->owner->canEdit($member);
|
return $this->owner->canEdit($member);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user