Author: andreapatricelli Date: Tue May 27 07:54:25 2014 New Revision: 1597713
URL: http://svn.apache.org/r1597713 Log: RoleController: removed duplication of parent role in list of roles to delete Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java?rev=1597713&r1=1597712&r2=1597713&view=diff ============================================================================== --- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java (original) +++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java Tue May 27 07:54:25 2014 @@ -308,10 +308,9 @@ public class RoleController extends Abst final SyncopeRole syncopeRole = roleDAO.find(roleId); if (syncopeRole != null) { - toBeDeprovisioned.add(syncopeRole); - - final List<SyncopeRole> descendants = roleDAO.findDescendants(toBeDeprovisioned.get(0)); + final List<SyncopeRole> descendants = roleDAO.findDescendants(syncopeRole); if (descendants != null) { + // between descendants there is also parent role syncopeRole (to delete) toBeDeprovisioned.addAll(descendants); } }
