IDEMPIERE-111 Admin role can delete System records !!!

http://jira.idempiere.com/browse/IDEMPIERE-111
This commit is contained in:
Carlos Ruiz 2012-01-09 21:45:30 -05:00
parent 2551e17141
commit 6d085eb5ea
1 changed files with 11 additions and 1 deletions

View File

@ -2550,7 +2550,17 @@ public class GridTable extends AbstractTableModel
return false; return false;
} }
} }
// Carlos Ruiz - globalqss - IDEMPIERE-111
// Check if the role has access to this client
// Can we change?
int[] co = getClientOrg(m_rowChanged);
int AD_Client_ID = co[0];
int AD_Org_ID = co[1];
if (!MRole.getDefault(m_ctx, false).canUpdate(AD_Client_ID, AD_Org_ID, m_AD_Table_ID, 0, true))
{
fireDataStatusEEvent("AccessCannotDelete", "", true);
return false;
}
/** @todo check Access */ /** @todo check Access */
// fireDataStatusEvent(Log.retrieveError()); // fireDataStatusEvent(Log.retrieveError());