You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by an...@apache.org on 2014/05/27 10:08:43 UTC

svn commit: r1597715 - in /syncope/trunk: ./ core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java

Author: andreapatricelli
Date: Tue May 27 08:08:43 2014
New Revision: 1597715

URL: http://svn.apache.org/r1597715
Log:
merge from branch 1_1_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1597709-1597713

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java?rev=1597715&r1=1597714&r2=1597715&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java Tue May 27 08:08:43 2014
@@ -300,10 +300,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) {
+                // among descendants there is also parent role syncopeRole (to delete)
                 toBeDeprovisioned.addAll(descendants);
             }
         }