// checks to see if the Authentication object principal is the owner of the supplied WidgetTag object
// if trustedDomainObject is false, pull the entity from the database first to ensure
// the model object is trusted and hasn't been modified
private boolean isWidgetTagOwner(Authentication authentication, WidgetTag widgetTag, List<WidgetTag> trustedWidgetTagContainer, boolean trustedDomainObject) {
WidgetTag trustedWidgetTag = null;
if (trustedDomainObject) {
trustedWidgetTag = widgetTag;
} else {
trustedWidgetTag = getTrustedWidgetTag(widgetTag.getWidgetId(), widgetTag.getTag().getKeyword(), trustedWidgetTagContainer);
}
return isWidgetTagOwnerByUsername(authentication, trustedWidgetTag.getUser().getUsername());
}