@Override public void deleteEntry(String id) { acquireConnection(); if (!canDeleteMultiTenantEntry(id)) { throw new OperationNotAllowedException("Operation not allowed in the current tenant context", "label.directory.error.multi.tenant.operationNotAllowed", null); } super.deleteEntry(id); }
String entryTenantId = (String) docModel.getProperty(schemaName, TENANT_ID_FIELD); if (StringUtils.isBlank(entryTenantId) || !entryTenantId.equals(tenantId)) { throw new OperationNotAllowedException("Operation not allowed in the current tenant context", "label.directory.error.multi.tenant.operationNotAllowed", null);
docModel.getId(), tenantId)); throw new OperationNotAllowedException("Operation not allowed in the current tenant context", "label.directory.error.multi.tenant.operationNotAllowed", null);
@Override public void deleteEntry(String id) { if (!canDeleteMultiTenantEntry(id)) { throw new OperationNotAllowedException("Operation not allowed in the current tenant context", "label.directory.error.multi.tenant.operationNotAllowed", null); } checkPermission(SecurityConstants.WRITE); checkDeleteConstraints(id); for (Reference reference : getDirectory().getReferences()) { if (reference.getClass() == referenceClass) { reference.removeLinksForSource(id, this); } else { reference.removeLinksForSource(id); } } deleteEntryWithoutReferences(id); getDirectory().invalidateCaches(); }