final App app = StructrApp.getInstance();
try {
// delete grant
DynamicResourceAccess grant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, signature).getFirst();
if (grant != null) {
app.delete(grant);
}
// delete grant
DynamicResourceAccess schemaGrant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, "_schema/" + signature).getFirst();
if (schemaGrant != null) {
app.delete(schemaGrant);
}
// delete grant
DynamicResourceAccess viewGrant = app.nodeQuery(DynamicResourceAccess.class).and(DynamicResourceAccess.signature, signature + "/_Ui").getFirst();
if (viewGrant != null) {
app.delete(viewGrant);
}