From ef0d90550cbc48392d49bc6380fe91cc5e2fb23e Mon Sep 17 00:00:00 2001 From: Arved Solth Date: Fri, 8 Nov 2024 17:16:29 +0100 Subject: [PATCH] Filter role list by client --- .../org/kitodo/production/services/data/RoleService.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Kitodo/src/main/java/org/kitodo/production/services/data/RoleService.java b/Kitodo/src/main/java/org/kitodo/production/services/data/RoleService.java index fbea3666e90..8a4ea8cc679 100644 --- a/Kitodo/src/main/java/org/kitodo/production/services/data/RoleService.java +++ b/Kitodo/src/main/java/org/kitodo/production/services/data/RoleService.java @@ -69,9 +69,6 @@ public Long countDatabaseRows() throws DAOException { @Override public Long countResults(Map filters) throws DAOException { - if (ServiceManager.getSecurityAccessService().hasAuthorityGlobalToViewRoleList()) { - return countDatabaseRows(); - } if (ServiceManager.getSecurityAccessService().hasAuthorityToViewRoleList()) { return countDatabaseRows("SELECT COUNT(*) FROM Role AS r INNER JOIN r.client AS c WITH c.id = :clientId", Collections.singletonMap(CLIENT_ID, ServiceManager.getUserService().getSessionClientId())); @@ -86,11 +83,7 @@ public List getAllForSelectedClient() { } @Override - @SuppressWarnings("unchecked") public List loadData(int first, int pageSize, String sortField, SortOrder sortOrder, Map filters) { - if (ServiceManager.getSecurityAccessService().hasAuthorityGlobalToViewRoleList()) { - return dao.getByQuery("FROM Role" + getSort(sortField, sortOrder), filters, first, pageSize); - } if (ServiceManager.getSecurityAccessService().hasAuthorityToViewRoleList()) { return dao.getByQuery("SELECT r FROM Role AS r INNER JOIN r.client AS c WITH c.id = :clientId" + getSort(sortField, sortOrder),