mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Including canCreate in if statement so that button gets removed if user isn't to be able to create new records
This commit is contained in:
parent
abaeeb9432
commit
f7c1be7ac1
@ -323,7 +323,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
|
|||||||
|
|
||||||
$rightGroup->push($previousAndNextGroup);
|
$rightGroup->push($previousAndNextGroup);
|
||||||
|
|
||||||
if ($component && $component->getShowAdd()) {
|
if ($component && $component->getShowAdd() && $this->record->canCreate()) {
|
||||||
$rightGroup->push(
|
$rightGroup->push(
|
||||||
LiteralField::create(
|
LiteralField::create(
|
||||||
'new-record',
|
'new-record',
|
||||||
|
Loading…
Reference in New Issue
Block a user