From 6b987c64bcf6b250bbf7a954553c43352780993b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20G=C3=A9raud?= Date: Wed, 14 Nov 2018 18:00:10 +0100 Subject: [PATCH] fix(plan): access plan management with only read permission fix gravitee-io/issues#1659 --- .../api/portal/plans/list-plans.controller.ts | 2 +- src/management/api/portal/plans/list-plans.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/management/api/portal/plans/list-plans.controller.ts b/src/management/api/portal/plans/list-plans.controller.ts index cda21e7cb5..97fc31be6a 100644 --- a/src/management/api/portal/plans/list-plans.controller.ts +++ b/src/management/api/portal/plans/list-plans.controller.ts @@ -97,7 +97,7 @@ class ApiListPlansController { changeFilter(statusFilter) { this.selectedStatus = statusFilter; - this.dndEnabled = (statusFilter === 'published'); + this.dndEnabled = (statusFilter === 'published') && this.UserService.isUserHasPermissions(['api-plan-u']); if (_.includes(this.selectedStatus, statusFilter)) { _.pull(this.selectedStatus, statusFilter); diff --git a/src/management/api/portal/plans/list-plans.html b/src/management/api/portal/plans/list-plans.html index 6f4e20318a..30ae4ea6a0 100644 --- a/src/management/api/portal/plans/list-plans.html +++ b/src/management/api/portal/plans/list-plans.html @@ -42,15 +42,15 @@

Authentication: {{plan.security}} - - Configure plan + + Configurezzzz plan - + Publish plan - + Close plan @@ -82,7 +82,7 @@
{{characteristic}}
-
+
Plans can be re-ordered by dragging & dropping them.