Francois Gouget : testbot/web: Only link to the VM details page for administrators.
Alexandre Julliard
julliard at winehq.org
Mon Jun 6 15:05:09 CDT 2022
Module: tools
Branch: master
Commit: c134dc1579cc697df495adc533434a2123d13b8d
URL: https://source.winehq.org/git/tools.git/?a=commit;h=c134dc1579cc697df495adc533434a2123d13b8d
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Jun 3 19:20:14 2022 +0200
testbot/web: Only link to the VM details page for administrators.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/web/index.pl | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/testbot/web/index.pl b/testbot/web/index.pl
index b07b39d..21ee5fe 100644
--- a/testbot/web/index.pl
+++ b/testbot/web/index.pl
@@ -176,6 +176,15 @@ use ObjectModel::CGI::CollectionBlock;
our @ISA = qw(ObjectModel::CGI::CollectionBlock);
+sub GetDetailsPage($)
+{
+ my ($self) = @_;
+ my $Session = $self->{EnclosingPage}->GetCurrentSession();
+ my $CurrentUser = $Session->User if (defined $Session);
+ return (!$CurrentUser or !$CurrentUser->HasRole("admin")) ? undef :
+ "/admin/VMDetails.pl";
+}
+
sub DisplayProperty($$)
{
my ($self, $PropertyDescriptor) = @_;
More information about the wine-cvs
mailing list