[roleInheritance] Add return information in recalculation methods
authorCarlos Aristu <carlos.aristu@openbravo.com>
Wed, 30 Sep 2015 20:12:56 +0200
changeset 27782 1e5a95337267
parent 27781 a24894d931bd
child 27783 785f90e7329f
[roleInheritance] Add return information in recalculation methods
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src/org/openbravo/roleInheritance/RecalculatePermissionsHandler.java
src/org/openbravo/roleInheritance/RoleInheritanceManager.java
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 10:19:00 2015 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 20:12:56 2015 +0200
@@ -713,6 +713,19 @@
 <!--59C9FFE39DD248DF9E60AE5C6B22A166-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--59C9FFE39DD248DF9E60AE5C6B22A166--></AD_MESSAGE>
 
+<!--5A14C677DAD14CEF87F3CDA618A10582--><AD_MESSAGE>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <AD_MESSAGE_ID><![CDATA[5A14C677DAD14CEF87F3CDA618A10582]]></AD_MESSAGE_ID>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <VALUE><![CDATA[OBUIAPP_Process_Access_PermissionsCount]]></VALUE>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <MSGTEXT><![CDATA[Process Definition: %0 updated, %1 created]]></MSGTEXT>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5A14C677DAD14CEF87F3CDA618A10582-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--5A14C677DAD14CEF87F3CDA618A10582--></AD_MESSAGE>
+
 <!--5A40D3779E0C4F2BAE25C2153D4BB858--><AD_MESSAGE>
 <!--5A40D3779E0C4F2BAE25C2153D4BB858-->  <AD_MESSAGE_ID><![CDATA[5A40D3779E0C4F2BAE25C2153D4BB858]]></AD_MESSAGE_ID>
 <!--5A40D3779E0C4F2BAE25C2153D4BB858-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1761,6 +1774,19 @@
 <!--E25F7BC6017747E08BDBAD4DD01DD316-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--E25F7BC6017747E08BDBAD4DD01DD316--></AD_MESSAGE>
 
+<!--E2CFCC268524436DBD625057291FEC48--><AD_MESSAGE>
+<!--E2CFCC268524436DBD625057291FEC48-->  <AD_MESSAGE_ID><![CDATA[E2CFCC268524436DBD625057291FEC48]]></AD_MESSAGE_ID>
+<!--E2CFCC268524436DBD625057291FEC48-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E2CFCC268524436DBD625057291FEC48-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E2CFCC268524436DBD625057291FEC48-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E2CFCC268524436DBD625057291FEC48-->  <VALUE><![CDATA[obuiapp_ViewRoleAccess_PermissionsCount]]></VALUE>
+<!--E2CFCC268524436DBD625057291FEC48-->  <MSGTEXT><![CDATA[View Implementation: %0 updated, %1 created]]></MSGTEXT>
+<!--E2CFCC268524436DBD625057291FEC48-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--E2CFCC268524436DBD625057291FEC48-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--E2CFCC268524436DBD625057291FEC48-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--E2CFCC268524436DBD625057291FEC48-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--E2CFCC268524436DBD625057291FEC48--></AD_MESSAGE>
+
 <!--E4446D7FB74A4C57A9C715B4DDACC3E9--><AD_MESSAGE>
 <!--E4446D7FB74A4C57A9C715B4DDACC3E9-->  <AD_MESSAGE_ID><![CDATA[E4446D7FB74A4C57A9C715B4DDACC3E9]]></AD_MESSAGE_ID>
 <!--E4446D7FB74A4C57A9C715B4DDACC3E9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 10:19:00 2015 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 20:12:56 2015 +0200
@@ -370,6 +370,19 @@
 <!--D51589640C7D4E488C3DE86C84B54DA4-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--D51589640C7D4E488C3DE86C84B54DA4--></AD_MESSAGE>
 
+<!--D59B2FE26D0A40A5B40450B671A2F4E0--><AD_MESSAGE>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <AD_MESSAGE_ID><![CDATA[D59B2FE26D0A40A5B40450B671A2F4E0]]></AD_MESSAGE_ID>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <VALUE><![CDATA[OBKMO_WidgetClassAccess_PermissionsCount]]></VALUE>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <MSGTEXT><![CDATA[Widget Class Access: %0 updated, %1 created]]></MSGTEXT>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--D59B2FE26D0A40A5B40450B671A2F4E0--></AD_MESSAGE>
+
 <!--DAC446583C4E4DDB8129536D2EAE2C03--><AD_MESSAGE>
 <!--DAC446583C4E4DDB8129536D2EAE2C03-->  <AD_MESSAGE_ID><![CDATA[DAC446583C4E4DDB8129536D2EAE2C03]]></AD_MESSAGE_ID>
 <!--DAC446583C4E4DDB8129536D2EAE2C03-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 10:19:00 2015 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 30 20:12:56 2015 +0200
@@ -17767,6 +17767,19 @@
 <!--2C3304D1DF4C4709A298FD8DCBCB61FE-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--2C3304D1DF4C4709A298FD8DCBCB61FE--></AD_MESSAGE>
 
+<!--2C4B3517005F4CDAAD3D72202314EBA9--><AD_MESSAGE>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <AD_MESSAGE_ID><![CDATA[2C4B3517005F4CDAAD3D72202314EBA9]]></AD_MESSAGE_ID>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <VALUE><![CDATA[ADPreference_PermissionsCount]]></VALUE>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <MSGTEXT><![CDATA[Preference: %0 updated, %1 created]]></MSGTEXT>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2C4B3517005F4CDAAD3D72202314EBA9-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--2C4B3517005F4CDAAD3D72202314EBA9--></AD_MESSAGE>
+
 <!--2C539098657A4D61863A636E6674BCB4--><AD_MESSAGE>
 <!--2C539098657A4D61863A636E6674BCB4-->  <AD_MESSAGE_ID><![CDATA[2C539098657A4D61863A636E6674BCB4]]></AD_MESSAGE_ID>
 <!--2C539098657A4D61863A636E6674BCB4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -18828,6 +18841,19 @@
 <!--417C01FAE8E447F7985AA6C04074924C-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--417C01FAE8E447F7985AA6C04074924C--></AD_MESSAGE>
 
+<!--41F4EE324D934018A3F18A7F7C3689AD--><AD_MESSAGE>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <AD_MESSAGE_ID><![CDATA[41F4EE324D934018A3F18A7F7C3689AD]]></AD_MESSAGE_ID>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <VALUE><![CDATA[PermissionsNotModified]]></VALUE>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <MSGTEXT><![CDATA[It did not require any change in the current role accesses]]></MSGTEXT>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--41F4EE324D934018A3F18A7F7C3689AD-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--41F4EE324D934018A3F18A7F7C3689AD--></AD_MESSAGE>
+
 <!--41FE2620DA004B0CA13E7D9266BBBD96--><AD_MESSAGE>
 <!--41FE2620DA004B0CA13E7D9266BBBD96-->  <AD_MESSAGE_ID><![CDATA[41FE2620DA004B0CA13E7D9266BBBD96]]></AD_MESSAGE_ID>
 <!--41FE2620DA004B0CA13E7D9266BBBD96-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -18840,6 +18866,19 @@
 <!--41FE2620DA004B0CA13E7D9266BBBD96-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--41FE2620DA004B0CA13E7D9266BBBD96--></AD_MESSAGE>
 
+<!--425AB33F1F554D93B90525D86F6D876E--><AD_MESSAGE>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <AD_MESSAGE_ID><![CDATA[425AB33F1F554D93B90525D86F6D876E]]></AD_MESSAGE_ID>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <VALUE><![CDATA[ADAlertRecipient_PermissionsCount]]></VALUE>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <MSGTEXT><![CDATA[Alert Recipient: %0 updated, %1 created]]></MSGTEXT>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--425AB33F1F554D93B90525D86F6D876E-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--425AB33F1F554D93B90525D86F6D876E--></AD_MESSAGE>
+
 <!--4302796059044F0DBCA7929F152163B7--><AD_MESSAGE>
 <!--4302796059044F0DBCA7929F152163B7-->  <AD_MESSAGE_ID><![CDATA[4302796059044F0DBCA7929F152163B7]]></AD_MESSAGE_ID>
 <!--4302796059044F0DBCA7929F152163B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -19287,6 +19326,19 @@
 <!--4D4E566D206546908DB84B065999789C-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--4D4E566D206546908DB84B065999789C--></AD_MESSAGE>
 
+<!--4D55A35B228A41239005471454C7D0AF--><AD_MESSAGE>
+<!--4D55A35B228A41239005471454C7D0AF-->  <AD_MESSAGE_ID><![CDATA[4D55A35B228A41239005471454C7D0AF]]></AD_MESSAGE_ID>
+<!--4D55A35B228A41239005471454C7D0AF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4D55A35B228A41239005471454C7D0AF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4D55A35B228A41239005471454C7D0AF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4D55A35B228A41239005471454C7D0AF-->  <VALUE><![CDATA[ADTabAccess_PermissionsCount]]></VALUE>
+<!--4D55A35B228A41239005471454C7D0AF-->  <MSGTEXT><![CDATA[Tab Access: %0 updated, %1 created]]></MSGTEXT>
+<!--4D55A35B228A41239005471454C7D0AF-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--4D55A35B228A41239005471454C7D0AF-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--4D55A35B228A41239005471454C7D0AF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4D55A35B228A41239005471454C7D0AF-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--4D55A35B228A41239005471454C7D0AF--></AD_MESSAGE>
+
 <!--4D6A63EA1EF84C488D3E03F82C33C54C--><AD_MESSAGE>
 <!--4D6A63EA1EF84C488D3E03F82C33C54C-->  <AD_MESSAGE_ID><![CDATA[4D6A63EA1EF84C488D3E03F82C33C54C]]></AD_MESSAGE_ID>
 <!--4D6A63EA1EF84C488D3E03F82C33C54C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -19615,6 +19667,19 @@
 <!--55F87823043F485082AE98D29F5A997D-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--55F87823043F485082AE98D29F5A997D--></AD_MESSAGE>
 
+<!--5622DDE5296A4F40AD9ED686AAA6A478--><AD_MESSAGE>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <AD_MESSAGE_ID><![CDATA[5622DDE5296A4F40AD9ED686AAA6A478]]></AD_MESSAGE_ID>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <VALUE><![CDATA[ADFieldAccess_PermissionsCount]]></VALUE>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <MSGTEXT><![CDATA[Field Access: %0 updated, %1 created]]></MSGTEXT>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5622DDE5296A4F40AD9ED686AAA6A478-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--5622DDE5296A4F40AD9ED686AAA6A478--></AD_MESSAGE>
+
 <!--56FCE60F272C49789E1609B91B904D71--><AD_MESSAGE>
 <!--56FCE60F272C49789E1609B91B904D71-->  <AD_MESSAGE_ID><![CDATA[56FCE60F272C49789E1609B91B904D71]]></AD_MESSAGE_ID>
 <!--56FCE60F272C49789E1609B91B904D71-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21049,6 +21114,19 @@
 <!--78E97291BF144E509C9687FBB59263DD-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--78E97291BF144E509C9687FBB59263DD--></AD_MESSAGE>
 
+<!--78E992C668F94CF09A06086CB725EAD1--><AD_MESSAGE>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <AD_MESSAGE_ID><![CDATA[78E992C668F94CF09A06086CB725EAD1]]></AD_MESSAGE_ID>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <VALUE><![CDATA[ADTableAccess_PermissionsCount]]></VALUE>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <MSGTEXT><![CDATA[Table Access: %0 updated, %1 created]]></MSGTEXT>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--78E992C668F94CF09A06086CB725EAD1-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--78E992C668F94CF09A06086CB725EAD1--></AD_MESSAGE>
+
 <!--7926E442780341759156EECDF48676F0--><AD_MESSAGE>
 <!--7926E442780341759156EECDF48676F0-->  <AD_MESSAGE_ID><![CDATA[7926E442780341759156EECDF48676F0]]></AD_MESSAGE_ID>
 <!--7926E442780341759156EECDF48676F0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -23572,6 +23650,19 @@
 <!--B22364B632144C2FA68384163FE4D447-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--B22364B632144C2FA68384163FE4D447--></AD_MESSAGE>
 
+<!--B2725EEAC0294F96A44FF441669EAD59--><AD_MESSAGE>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <AD_MESSAGE_ID><![CDATA[B2725EEAC0294F96A44FF441669EAD59]]></AD_MESSAGE_ID>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <VALUE><![CDATA[PermissionsModifiedForRoles]]></VALUE>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <MSGTEXT><![CDATA[Accesses for the following roles have been created/updated:%0]]></MSGTEXT>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B2725EEAC0294F96A44FF441669EAD59-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--B2725EEAC0294F96A44FF441669EAD59--></AD_MESSAGE>
+
 <!--B2AC39FDE8B74E0BBC2C71366BFAE665--><AD_MESSAGE>
 <!--B2AC39FDE8B74E0BBC2C71366BFAE665-->  <AD_MESSAGE_ID><![CDATA[B2AC39FDE8B74E0BBC2C71366BFAE665]]></AD_MESSAGE_ID>
 <!--B2AC39FDE8B74E0BBC2C71366BFAE665-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -24680,6 +24771,19 @@
 <!--CB9180AADFA048D9B9F7CA84552F6B2D-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--CB9180AADFA048D9B9F7CA84552F6B2D--></AD_MESSAGE>
 
+<!--CBCE57688F7A47D8974A381CD25516EF--><AD_MESSAGE>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <AD_MESSAGE_ID><![CDATA[CBCE57688F7A47D8974A381CD25516EF]]></AD_MESSAGE_ID>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <VALUE><![CDATA[ADFormAccess_PermissionsCount]]></VALUE>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <MSGTEXT><![CDATA[Form Access: %0 updated, %1 created]]></MSGTEXT>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CBCE57688F7A47D8974A381CD25516EF-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--CBCE57688F7A47D8974A381CD25516EF--></AD_MESSAGE>
+
 <!--CBDF571CAC604569A1BC5A5080806E71--><AD_MESSAGE>
 <!--CBDF571CAC604569A1BC5A5080806E71-->  <AD_MESSAGE_ID><![CDATA[CBDF571CAC604569A1BC5A5080806E71]]></AD_MESSAGE_ID>
 <!--CBDF571CAC604569A1BC5A5080806E71-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -25354,6 +25458,19 @@
 <!--DA317D308E294B55BA3DB949F45AA9BA-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--DA317D308E294B55BA3DB949F45AA9BA--></AD_MESSAGE>
 
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6--><AD_MESSAGE>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <AD_MESSAGE_ID><![CDATA[DAC299FC64FA4176A64D4B94DEE1B8E6]]></AD_MESSAGE_ID>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <VALUE><![CDATA[ADProcessAccess_PermissionsCount]]></VALUE>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <MSGTEXT><![CDATA[Report and Process Access: %0 updated, %1 created]]></MSGTEXT>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--DAC299FC64FA4176A64D4B94DEE1B8E6--></AD_MESSAGE>
+
 <!--DAD951EF2B0548F68AD853B6AF578FD3--><AD_MESSAGE>
 <!--DAD951EF2B0548F68AD853B6AF578FD3-->  <AD_MESSAGE_ID><![CDATA[DAD951EF2B0548F68AD853B6AF578FD3]]></AD_MESSAGE_ID>
 <!--DAD951EF2B0548F68AD853B6AF578FD3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -25632,6 +25749,19 @@
 <!--E2670BE243274B3CBAF627D17B0696D9-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--E2670BE243274B3CBAF627D17B0696D9--></AD_MESSAGE>
 
+<!--E27550B361614883A233DEE26B471747--><AD_MESSAGE>
+<!--E27550B361614883A233DEE26B471747-->  <AD_MESSAGE_ID><![CDATA[E27550B361614883A233DEE26B471747]]></AD_MESSAGE_ID>
+<!--E27550B361614883A233DEE26B471747-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E27550B361614883A233DEE26B471747-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E27550B361614883A233DEE26B471747-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E27550B361614883A233DEE26B471747-->  <VALUE><![CDATA[ADRoleOrganization_PermissionsCount]]></VALUE>
+<!--E27550B361614883A233DEE26B471747-->  <MSGTEXT><![CDATA[Org Access: %0 updated, %1 created]]></MSGTEXT>
+<!--E27550B361614883A233DEE26B471747-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--E27550B361614883A233DEE26B471747-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--E27550B361614883A233DEE26B471747-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E27550B361614883A233DEE26B471747-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--E27550B361614883A233DEE26B471747--></AD_MESSAGE>
+
 <!--E2C2CBA4C17D4F9AA5F130ACE83D39E5--><AD_MESSAGE>
 <!--E2C2CBA4C17D4F9AA5F130ACE83D39E5-->  <AD_MESSAGE_ID><![CDATA[E2C2CBA4C17D4F9AA5F130ACE83D39E5]]></AD_MESSAGE_ID>
 <!--E2C2CBA4C17D4F9AA5F130ACE83D39E5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -26138,6 +26268,19 @@
 <!--ED29E885BB414C1FB92222716A4C12FC-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--ED29E885BB414C1FB92222716A4C12FC--></AD_MESSAGE>
 
+<!--ED42BCD53E8F49C4B4FA152982EB9879--><AD_MESSAGE>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <AD_MESSAGE_ID><![CDATA[ED42BCD53E8F49C4B4FA152982EB9879]]></AD_MESSAGE_ID>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <VALUE><![CDATA[ADWindowAccess_PermissionsCount]]></VALUE>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <MSGTEXT><![CDATA[Window Access: %0 updated, %1 created]]></MSGTEXT>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <MSGTIP><![CDATA[]]></MSGTIP>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--ED42BCD53E8F49C4B4FA152982EB9879-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--ED42BCD53E8F49C4B4FA152982EB9879--></AD_MESSAGE>
+
 <!--ED94DA7D967E401B93DDFFE86C9715A9--><AD_MESSAGE>
 <!--ED94DA7D967E401B93DDFFE86C9715A9-->  <AD_MESSAGE_ID><![CDATA[ED94DA7D967E401B93DDFFE86C9715A9]]></AD_MESSAGE_ID>
 <!--ED94DA7D967E401B93DDFFE86C9715A9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/roleInheritance/RecalculatePermissionsHandler.java	Wed Sep 30 10:19:00 2015 +0200
+++ b/src/org/openbravo/roleInheritance/RecalculatePermissionsHandler.java	Wed Sep 30 20:12:56 2015 +0200
@@ -18,14 +18,19 @@
  */
 package org.openbravo.roleInheritance;
 
+import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
 import org.openbravo.client.kernel.BaseActionHandler;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.ad.access.Role;
+import org.openbravo.roleInheritance.RoleInheritanceManager.AccessType;
 import org.openbravo.service.db.DbUtility;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -42,24 +47,40 @@
       String roleId = request.getString("roleId");
       Role role = OBDal.getInstance().get(Role.class, roleId);
 
-      String[] messageParameter = { role.getName() };
+      String[] successMessageParameter = { role.getName() };
       String successMessage;
+      String textMessage;
       // Possible actions:
       // - DEFAULT: Recalculate permissions for the selected (non template) role
       // - TEMPLATE: Recalculate permissions for all roles inheriting by the selected template role
       if ("TEMPLATE".equals(action)) {
-        RoleInheritanceManager.recalculateAllAccessesFromTemplate(role);
+        List<Role> updatedRoles = RoleInheritanceManager.recalculateAllAccessesFromTemplate(role);
+        if (updatedRoles.size() > 0) {
+          String updatedRoleList = "";
+          for (Role updatedRole : updatedRoles) {
+            updatedRoleList += ", " + updatedRole.getName();
+          }
+          String[] msgParam = { updatedRoleList.substring(1) };
+          textMessage = OBMessageUtils.getI18NMessage("PermissionsModifiedForRoles", msgParam);
+        } else {
+          textMessage = "PermissionsNotModified";
+        }
         successMessage = "RecalculateTemplatePermissionsSuccess";
       } else {
-        RoleInheritanceManager.recalculateAllAccessesForRole(role);
+        Map<AccessType, List<Integer>> accessCount = RoleInheritanceManager
+            .recalculateAllAccessesForRole(role);
+        textMessage = composeAccessMessageText(accessCount);
+        if (StringUtils.isEmpty(textMessage)) {
+          textMessage = "PermissionsNotModified";
+        }
         successMessage = "RecalculatePermissionsSuccess";
       }
 
       // Create success message
       JSONObject message = new JSONObject();
       message.put("severity", "success");
-      message.put("title", "Success");
-      message.put("text", OBMessageUtils.getI18NMessage(successMessage, messageParameter));
+      message.put("title", OBMessageUtils.getI18NMessage(successMessage, successMessageParameter));
+      message.put("text", textMessage);
       response.put("message", message);
 
     } catch (Exception e) {
@@ -78,4 +99,25 @@
     }
     return response;
   }
+
+  private String composeAccessMessageText(Map<AccessType, List<Integer>> map) {
+    String text = "";
+    try {
+      for (AccessType accessType : map.keySet()) {
+        List<Integer> counters = (List<Integer>) map.get(accessType);
+        int updated = counters.get(0);
+        int created = counters.get(1);
+        if (updated > 0 || created > 0) {
+          Class<?> myClass = Class.forName(accessType.getClassName());
+          Entity entity = ModelProvider.getInstance().getEntity(myClass);
+          String[] params = { updated + "", created + "" };
+          text += OBMessageUtils.getI18NMessage(entity.getName() + "_PermissionsCount", params)
+              + " ";
+        }
+      }
+    } catch (Exception ex) {
+      log.error("Error creating the text for the returned message", ex);
+    }
+    return text;
+  }
 }
--- a/src/org/openbravo/roleInheritance/RoleInheritanceManager.java	Wed Sep 30 10:19:00 2015 +0200
+++ b/src/org/openbravo/roleInheritance/RoleInheritanceManager.java	Wed Sep 30 20:12:56 2015 +0200
@@ -20,8 +20,10 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
@@ -56,6 +58,10 @@
       "OBUIAPP_RecentDocumentsList", "OBUIAPP_RecentViewList", "OBUIAPP_GridConfiguration",
       "OBUIAPP_DefaultSavedView", "UINAVBA_RecentLaunchList"));
 
+  private static final int ACCESS_NOT_CHANGED = 0;
+  private static final int ACCESS_UPDATED = 1;
+  private static final int ACCESS_CREATED = 2;
+
   private final String className;
   private final String securedElement;
   private final List<String> skippedProperties;
@@ -392,9 +398,33 @@
   }
 
   /**
+   * Sets to null the Inherit From field to child elements (TabAccess and FieldAccess). This allows
+   * the cascade deletion of these elements when removing a Window Access or a Tab Access.
+   * 
+   * @param access
+   *          The access to be removed from the parent list
+   */
+  private void clearInheritFromFieldInChilds(InheritedAccessEnabled access) {
+    if ("org.openbravo.model.ad.access.WindowAccess".equals(className)) {
+      WindowAccess wa = (WindowAccess) access;
+      for (TabAccess ta : wa.getADTabAccessList()) {
+        ta.setInheritedFrom(null);
+        for (FieldAccess fa : ta.getADFieldAccessList()) {
+          fa.setInheritedFrom(null);
+        }
+      }
+    } else if ("org.openbravo.model.ad.access.TabAccess".equals(className)) {
+      TabAccess ta = (TabAccess) access;
+      for (FieldAccess fa : ta.getADFieldAccessList()) {
+        fa.setInheritedFrom(null);
+      }
+    }
+  }
+
+  /**
    * Removes references to child elements (TabAccess and FieldAccess) from the parent list. Using
    * this method prevents the "deleted object would be re-saved by cascade" error after deleting an
-   * inherited TabAccess or FieldAccess
+   * inherited TabAccess or FieldAccess.
    * 
    * @param access
    *          The access to be removed from the parent list
@@ -462,11 +492,22 @@
    * 
    * @param template
    *          The template role used by the roles whose accesses will be recalculated
+   * @return a list of the child roles which have accesses that have been updated or created
    */
-  public static void recalculateAllAccessesFromTemplate(Role template) {
+  public static List<Role> recalculateAllAccessesFromTemplate(Role template) {
+    List<Role> updatedRoles = new ArrayList<Role>();
     for (RoleInheritance ri : template.getADRoleInheritanceInheritFromList()) {
-      recalculateAllAccessesForRole(ri.getRole());
+      Map<AccessType, List<Integer>> result = recalculateAllAccessesForRole(ri.getRole());
+      for (AccessType accessType : result.keySet()) {
+        List<Integer> counters = (List<Integer>) result.get(accessType);
+        int updated = counters.get(0);
+        int created = counters.get(1);
+        if (updated > 0 || created > 0) {
+          updatedRoles.add(ri.getRole());
+        }
+      }
     }
+    return updatedRoles;
   }
 
   /**
@@ -474,14 +515,19 @@
    * 
    * @param role
    *          The role whose accesses will be recalculated
+   * @return a map with the number of accesses updated an created for every access type
    */
-  public static void recalculateAllAccessesForRole(Role role) {
+  public static Map<AccessType, List<Integer>> recalculateAllAccessesForRole(Role role) {
+    Map<AccessType, List<Integer>> result = new HashMap<AccessType, List<Integer>>();
     List<RoleInheritance> inheritanceList = getRoleInheritancesList(role);
     List<String> inheritanceRoleIdList = getRoleInheritancesInheritFromIdList(inheritanceList);
     for (AccessType accessType : AccessType.values()) {
       RoleInheritanceManager manager = new RoleInheritanceManager(accessType);
-      manager.calculateAccesses(inheritanceList, inheritanceRoleIdList);
+      List<Integer> accessCounters = manager.calculateAccesses(inheritanceList,
+          inheritanceRoleIdList);
+      result.put(accessType, accessCounters);
     }
+    return result;
   }
 
   /**
@@ -603,6 +649,7 @@
         if (!updated) {
           // access not present in other inheritances, remove it
           iaeToDelete.setInheritedFrom(null);
+          clearInheritFromFieldInChilds(iaeToDelete);
           removeChildReferences(iaeToDelete);
           roleAccessList.remove(iaeToDelete);
           OBDal.getInstance().remove(iaeToDelete);
@@ -676,9 +723,9 @@
    * @see RoleInheritanceManager#calculateAccesses(List<RoleInheritance>, List<String>,
    *      RoleInheritance)
    */
-  private void calculateAccesses(List<RoleInheritance> inheritanceList,
+  private List<Integer> calculateAccesses(List<RoleInheritance> inheritanceList,
       List<String> inheritanceInheritFromIdList) {
-    calculateAccesses(inheritanceList, inheritanceInheritFromIdList, null);
+    return calculateAccesses(inheritanceList, inheritanceInheritFromIdList, null);
   }
 
   /**
@@ -691,9 +738,12 @@
    *          priority when applying their related inheritances.
    * @param roleInheritanceToDelete
    *          If not null, the accesses introduced by this inheritance will be removed
+   * @return a list with two Integers containing the number of accesses updated and created
+   *         respectively.
    */
-  private void calculateAccesses(List<RoleInheritance> inheritanceList,
+  private List<Integer> calculateAccesses(List<RoleInheritance> inheritanceList,
       List<String> inheritanceInheritFromIdList, RoleInheritance roleInheritanceToDelete) {
+    int[] counters = new int[] { 0, 0, 0 };
     for (RoleInheritance roleInheritance : inheritanceList) {
       for (InheritedAccessEnabled inheritedAccess : getAccessList(roleInheritance.getInheritFrom())) {
         if ("org.openbravo.model.ad.domain.Preference".equals(className)
@@ -704,7 +754,8 @@
             && !isInheritableAlertRecipient((AlertRecipient) inheritedAccess)) {
           continue;
         }
-        handleAccess(roleInheritance, inheritedAccess, inheritanceInheritFromIdList);
+        int res = handleAccess(roleInheritance, inheritedAccess, inheritanceInheritFromIdList);
+        counters[res]++;
       }
     }
     if (roleInheritanceToDelete != null) {
@@ -712,6 +763,10 @@
       deleteRoleAccess(roleInheritanceToDelete.getInheritFrom(),
           getAccessList(roleInheritanceToDelete.getRole()));
     }
+    List<Integer> result = new ArrayList<Integer>();
+    result.add(new Integer(counters[ACCESS_UPDATED])); // number of accesses updated
+    result.add(new Integer(counters[ACCESS_CREATED])); // number of accesses created
+    return result;
   }
 
   /**
@@ -723,13 +778,15 @@
    *          An existing access candidate to be overridden
    * @param inheritanceInheritFromIdList
    *          A list of template role ids which determines the priority of the template roles
+   * @return an integer that indicates the final action done with the access: not changed
+   *         (ACCESS_NOT_CHANGED), updated (ACCESS_UPDATED) or created (ACCESS_CREATED).
    */
-  private void handleAccess(RoleInheritance roleInheritance,
-      InheritedAccessEnabled inheritedAccess, List<String> inheritanceInheritFromIdList) {
+  private int handleAccess(RoleInheritance roleInheritance, InheritedAccessEnabled inheritedAccess,
+      List<String> inheritanceInheritFromIdList) {
     String inheritedAccessElementId = getSecuredElementIdentifier(inheritedAccess);
     String newInheritedFromId = (String) DalUtil.getId(roleInheritance.getInheritFrom());
-    boolean found = false;
-    for (InheritedAccessEnabled access : getAccessList(roleInheritance.getRole())) {
+    Role role = roleInheritance.getRole();
+    for (InheritedAccessEnabled access : getAccessList(role)) {
       String accessElementId = getSecuredElementIdentifier(access);
       String currentInheritedFromId = access.getInheritedFrom() != null ? (String) DalUtil
           .getId(access.getInheritedFrom()) : "";
@@ -737,14 +794,17 @@
         if (!StringUtils.isEmpty(currentInheritedFromId)
             && isPrecedent(inheritanceInheritFromIdList, currentInheritedFromId, newInheritedFromId)) {
           updateRoleAccess(access, inheritedAccess);
+          log4j.debug("Updated access for role " + role.getName() + ": class = " + className
+              + " secured element id = " + inheritedAccessElementId);
+          return ACCESS_UPDATED;
         }
-        found = true;
-        break;
+        return ACCESS_NOT_CHANGED;
       }
     }
-    if (!found) {
-      copyRoleAccess(inheritedAccess, roleInheritance.getRole());
-    }
+    copyRoleAccess(inheritedAccess, roleInheritance.getRole());
+    log4j.debug("Created access for role " + role.getName() + ": class = " + className
+        + " secured element id = " + inheritedAccessElementId);
+    return ACCESS_CREATED;
   }
 
   /**