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),