This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git


The following commit(s) were added to refs/heads/master by this push:
     new f966293  Fixing entitlements for Reports
f966293 is described below

commit f96629318f9b34c954db326daa2fe2bde3286751
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Thu Jun 11 16:26:51 2020 +0200

    Fixing entitlements for Reports
---
 .../syncope/client/console/commons/IdRepoConstants.java     |  2 ++
 .../org/apache/syncope/client/console/pages/Reports.java    |  2 +-
 .../console/reports/ReportTemplateDirectoryPanel.java       | 13 ++++++-------
 .../client/console/reports/ReportletDirectoryPanel.java     |  2 +-
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoConstants.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoConstants.java
index 60dc743..566f7f0 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoConstants.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/commons/IdRepoConstants.java
@@ -78,6 +78,8 @@ public final class IdRepoConstants {
 
     public static final String PREF_MAIL_TEMPLATE_PAGINATOR_ROWS = 
"mail.template.paginator.rows";
 
+    public static final String PREF_REPORT_TEMPLATE_PAGINATOR_ROWS = 
"report.template.paginator.rows";
+
     public static final String PREF_PROPAGATION_TASKS_PAGINATOR_ROWS = 
"proagationtasks.paginator.rows";
 
     public static final String PREF_REPORT_TASKS_PAGINATOR_ROWS = 
"report.paginator.rows";
diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
index f51d647..889559d 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/pages/Reports.java
@@ -62,7 +62,7 @@ public class Reports extends BasePage {
 
             @Override
             public Panel getPanel(final String panelId) {
-                final MultilevelPanel mlp = new MultilevelPanel(panelId);
+                MultilevelPanel mlp = new MultilevelPanel(panelId);
                 mlp.setFirstLevel(new ReportDirectoryPanel(mlp, 
getPageReference()) {
 
                     private static final long serialVersionUID = 
-2195387360323687302L;
diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
index 950060e..3860c78 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportTemplateDirectoryPanel.java
@@ -104,7 +104,7 @@ public class ReportTemplateDirectoryPanel
 
         initResultTable();
 
-        MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, 
IdRepoEntitlement.MAIL_TEMPLATE_CREATE);
+        MetaDataRoleAuthorizationStrategy.authorize(addAjaxLink, RENDER, 
IdRepoEntitlement.REPORT_TEMPLATE_CREATE);
     }
 
     @Override
@@ -136,7 +136,7 @@ public class ReportTemplateDirectoryPanel
                 utilityModal.show(true);
                 target.add(utilityModal);
             }
-        }, ActionLink.ActionType.FO_EDIT, 
IdRepoEntitlement.MAIL_TEMPLATE_UPDATE);
+        }, ActionLink.ActionType.FO_EDIT, 
IdRepoEntitlement.REPORT_TEMPLATE_UPDATE);
 
         panel.add(new ActionLink<ReportTemplateTO>() {
 
@@ -154,7 +154,7 @@ public class ReportTemplateDirectoryPanel
                 utilityModal.show(true);
                 target.add(utilityModal);
             }
-        }, ActionLink.ActionType.HTML, IdRepoEntitlement.MAIL_TEMPLATE_UPDATE);
+        }, ActionLink.ActionType.HTML, 
IdRepoEntitlement.REPORT_TEMPLATE_UPDATE);
 
         panel.add(new ActionLink<ReportTemplateTO>() {
 
@@ -172,7 +172,7 @@ public class ReportTemplateDirectoryPanel
                 utilityModal.show(true);
                 target.add(utilityModal);
             }
-        }, ActionLink.ActionType.TEXT, IdRepoEntitlement.MAIL_TEMPLATE_UPDATE);
+        }, ActionLink.ActionType.TEXT, 
IdRepoEntitlement.REPORT_TEMPLATE_UPDATE);
 
         panel.add(new ActionLink<ReportTemplateTO>() {
 
@@ -190,7 +190,7 @@ public class ReportTemplateDirectoryPanel
                 }
                 ((BasePage) 
pageRef.getPage()).getNotificationPanel().refresh(target);
             }
-        }, ActionLink.ActionType.DELETE, 
IdRepoEntitlement.MAIL_TEMPLATE_DELETE, true);
+        }, ActionLink.ActionType.DELETE, 
IdRepoEntitlement.REPORT_TEMPLATE_DELETE, true);
 
         return panel;
     }
@@ -202,13 +202,12 @@ public class ReportTemplateDirectoryPanel
 
     @Override
     protected String paginatorRowsKey() {
-        return IdRepoConstants.PREF_MAIL_TEMPLATE_PAGINATOR_ROWS;
+        return IdRepoConstants.PREF_REPORT_TEMPLATE_PAGINATOR_ROWS;
     }
 
     @Override
     protected Collection<ActionLink.ActionType> getBatches() {
         return List.of();
-
     }
 
     protected final class ReportTemplateProvider extends 
DirectoryDataProvider<ReportTemplateTO> {
diff --git 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
index 070e0df..a04d2d3 100644
--- 
a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
+++ 
b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/reports/ReportletDirectoryPanel.java
@@ -163,7 +163,7 @@ public class ReportletDirectoryPanel extends DirectoryPanel<
                 }
                 ((BasePage) 
pageRef.getPage()).getNotificationPanel().refresh(target);
             }
-        }, ActionLink.ActionType.DELETE, IdRepoEntitlement.REPORT_DELETE, 
true);
+        }, ActionLink.ActionType.DELETE, IdRepoEntitlement.REPORT_UPDATE);
 
         return panel;
     }

Reply via email to