diff --git a/src/core/js/webcaosdb.js b/src/core/js/webcaosdb.js index 108c09b16e637db198337d745f9fd83b4d2589e0..de0ca4267167ae4f768db0a1033530a5bf88011a 100644 --- a/src/core/js/webcaosdb.js +++ b/src/core/js/webcaosdb.js @@ -1169,7 +1169,14 @@ var version_history = new function () { // check for the version_history fragment and open the modal if present. if (this._has_version_fragment()) { - logger.debug("Showing full version modal for first entity"); + const first_entity = $(".caosdb-entity-panel")[0]; + if (first_entity && hasEntityPermission(first_entity, "RETRIEVE:HISTORY")) { + console.log("Showing full version modal for first entity"); + const version_button = $(first_entity).find(".caosdb-f-entity-version-button"); + version_button.click(); + const full_version_history_button = $(first_entity).find(".caosdb-f-entity-version-load-history-btn"); + full_version_history_button.click(); + } } } }