From 477eb01424e826524b5618f0cbb08d7c15f19782 Mon Sep 17 00:00:00 2001
From: Fabien Quatravaux <fabien.quatravaux@riseup.net>
Date: Tue, 20 Oct 2020 09:33:45 +0200
Subject: [PATCH] feature: Show add circle button only if user has the proper
 rights

---
 src/views/admin/page-admin-circles.pug | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/views/admin/page-admin-circles.pug b/src/views/admin/page-admin-circles.pug
index a75f4323..bd21d6fa 100644
--- a/src/views/admin/page-admin-circles.pug
+++ b/src/views/admin/page-admin-circles.pug
@@ -33,10 +33,11 @@
 
         h3 Cercles
 
-        solid-link(
-          class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
-          next='admin-circle-create'
-        ) Créer un cercle
+        solid-ac-checker(data-src=`${endpoints.circles || (endpoints.get && endpoints.get.circles)}`, permission='acl:Append')
+          solid-link(
+            class='button text-bold text-uppercase reversed button-primary bordered with-icon icon-plus'
+            next='admin-circle-create'
+          ) Créer un cercle
 
       .table-wrapper
         .table
-- 
GitLab