code: protected void beforeDelete(ModeledAuthenticatedUser user,
              String identifier) throws GuacamoleException {
  
          // Verify permission to delete objects
          if (!hasObjectPermission(user, identifier, ObjectPermission.Type.DELETE))
              throw new GuacamoleSecurityException("Permission denied.");
  
      }
docs: Called before any object is deleted through this directory object
  service. This function serves as a final point of validation before
  the delete operation occurs. In its default implementation,
  beforeDelete() performs basic permissions checks.
  
  @param user
  The user deleting the existing object.
  
  @param identifier
  The identifier of the object being deleted.
  
  @throws GuacamoleException
  If the object is invalid, or an error prevents validating the given
  object.