diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d50551b37..421ef7a78 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -85,6 +85,7 @@ WebGUI and put into the WebGUI Community Wiki, http://www.webgui.org/community-wiki. - The Table of Contents view was removed from the Help system. The only view is now the Help Index. + - Allow editing previous revisions of assets in the current version tag 7.3.21 - fix: Self-deactivation doesn't show login screen after success diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index 5422bd53c..271e43a32 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -142,7 +142,9 @@ Returns 1 if it's not locked. Returns 1 if is locked, and the user is using the sub canEditIfLocked { my $self = shift; return 1 unless ($self->isLocked); - return ($self->session->scratch->get("versionTag") eq $self->get("tagId")); + my $ver_tag = $self->session->scratch->get("versionTag"); + my ($count) = $self->session->db->quickArray("select count(*) from assetData where assetId=? and tagId=?",[$self->getId, $ver_tag]); + return $count > 0; }