This allows derived pages to offer a read-only view of the item details just by overriding DisplayProperty().
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/ObjectModel/CGI/ItemPage.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/ItemPage.pm b/testbot/lib/ObjectModel/CGI/ItemPage.pm index 1b77eea01..8bea816b0 100644 --- a/testbot/lib/ObjectModel/CGI/ItemPage.pm +++ b/testbot/lib/ObjectModel/CGI/ItemPage.pm @@ -132,10 +132,7 @@ sub GetActions($) { my ($self) = @_;
- my @Actions = @{$self->SUPER::GetActions()}; - push @Actions, "Save", "Cancel"; - - return @Actions; + return $self->{HasRW} ? ["Save", "Cancel"] : []; }
sub RedirectToList($)