From c1230087e63512b429d91214a6507fec22412419 Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Fri, 8 Mar 2019 10:59:56 +0100 Subject: [PATCH] extended view --- README.md | 2 ++ admin.php | 1 + views/deploys/index.php | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 6b3ba25..00abb22 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,9 @@ It provides an integration with Drone CI promote feature to trigger a pipeline r There are just two permissions: - **manage.view** - provides access to the Drone deploy list +- **manage.extended_view** - provides access to drone logs - **manage.deploy** - provides access to trigger a new deploy +- **manage.settings** - provides access to configure the addon ### Drone CI pipeline example diff --git a/admin.php b/admin.php index 5665d4a..904400e 100644 --- a/admin.php +++ b/admin.php @@ -8,6 +8,7 @@ // Module ACL definitions. $this("acl")->addResource('drone', [ 'manage.view', + 'manage.extended_view', 'manage.deploy', 'manage.settings' ]); diff --git a/views/deploys/index.php b/views/deploys/index.php index 7990cea..d8394b5 100644 --- a/views/deploys/index.php +++ b/views/deploys/index.php @@ -108,6 +108,7 @@ pre h2.failure { @lang('State') + @if($app->module('cockpit')->hasaccess('drone', 'manage.extended_view')) @lang('Build') # @@ -117,6 +118,7 @@ pre h2.failure { @lang('Title') + @endif @lang('Created') @@ -126,9 +128,11 @@ pre h2.failure { @lang('Deploy time') + @if($app->module('cockpit')->hasaccess('drone', 'manage.extended_view')) @lang('Log') + @endif @@ -141,13 +145,17 @@ pre h2.failure { { App.i18n.get(deploy.status) } + @if($app->module('cockpit')->hasaccess('drone', 'manage.extended_view')) { deploy.number } { deploy.event } { deploy.message } + @endif { deploy.created_at } { deploy.updated_at } { deploy.deploy_time }s + @if($app->module('cockpit')->hasaccess('drone', 'manage.extended_view')) + @endif