mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX Bug with requiring login when posting a comment, pass correct controller in
This commit is contained in:
parent
2c00421cd2
commit
886c5be21a
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Comments\Forms;
|
namespace SilverStripe\Comments\Forms;
|
||||||
|
|
||||||
|
use SilverStripe\Control\HTTPResponse;
|
||||||
use SilverStripe\Forms\CompositeField;
|
use SilverStripe\Forms\CompositeField;
|
||||||
use SilverStripe\Forms\EmailField;
|
use SilverStripe\Forms\EmailField;
|
||||||
use SilverStripe\Forms\FieldList;
|
use SilverStripe\Forms\FieldList;
|
||||||
@ -192,7 +193,7 @@ class CommentForm extends Form
|
|||||||
// If commenting can only be done by logged in users, make sure the user is logged in
|
// If commenting can only be done by logged in users, make sure the user is logged in
|
||||||
if (!$this->controller->getOwnerRecord()->canPostComment()) {
|
if (!$this->controller->getOwnerRecord()->canPostComment()) {
|
||||||
return Security::permissionFailure(
|
return Security::permissionFailure(
|
||||||
$this,
|
$this->controller,
|
||||||
_t(
|
_t(
|
||||||
'SilverStripe\\Comments\\Controllers\\CommentingController.PERMISSIONFAILURE',
|
'SilverStripe\\Comments\\Controllers\\CommentingController.PERMISSIONFAILURE',
|
||||||
"You're not able to post comments to this page. Please ensure you are logged in and have an "
|
"You're not able to post comments to this page. Please ensure you are logged in and have an "
|
||||||
|
Loading…
Reference in New Issue
Block a user