summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/NodeForm.php
diff options
context:
space:
mode:
authorwebchick2016-10-11 19:51:35 (GMT)
committerwebchick2016-10-11 19:51:35 (GMT)
commit8dc87c91c364c0228dc9190162c7e74e8cd2dbc0 (patch)
tree326d7a4437581918024afe9dda169e9a5ec030bb /core/modules/node/src/NodeForm.php
parent4f917488f11cee91a31e6660b7738ee7e37d7064 (diff)
Issue #2744877 by katzilla, dernetzjaeger, biancajs, chipway, Gábor Hojtsy, catch, romainj, lucur, yoroy, kamalrajsahu21, dietmarg: Node add form shows 'create new revision' checkbox
Diffstat (limited to 'core/modules/node/src/NodeForm.php')
-rw-r--r--core/modules/node/src/NodeForm.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index 82faab7..d9437db 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -139,7 +139,7 @@ class NodeForm extends ContentEntityForm {
'#type' => 'checkbox',
'#title' => t('Create new revision'),
'#default_value' => $node->type->entity->isNewRevision(),
- '#access' => $current_user->hasPermission('administer nodes'),
+ '#access' => $current_user->hasPermission('administer nodes') && !$node->isNew(),
'#group' => 'revision_information',
);