mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: If a CTF without a show action is made readonly, don't add the show action back. (from r88960)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89204 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5ec83b9bd0
commit
96e449225e
@ -530,7 +530,10 @@ JS
|
||||
function performReadonlyTransformation() {
|
||||
$clone = clone $this;
|
||||
$clone->setShowPagination(false);
|
||||
$clone->setPermissions(array('show'));
|
||||
|
||||
// Only include the show action if it was in the original CTF.
|
||||
$clone->setPermissions(in_array('show', $this->permissions) ? array('show') : array());
|
||||
|
||||
$clone->addExtraClass( 'readonly' );
|
||||
$clone->setReadonly(true);
|
||||
return $clone;
|
||||
|
Loading…
x
Reference in New Issue
Block a user