diff --git a/wagtail/admin/views/pages.py b/wagtail/admin/views/pages.py
index 467492a284..85775b0d3d 100644
--- a/wagtail/admin/views/pages.py
+++ b/wagtail/admin/views/pages.py
@@ -391,6 +391,11 @@ def edit(request, page_id):
else:
lock_message = format_html(_("Page '{}' is locked by you."), page.get_admin_display_title())
+ lock_message += format_html(
+ '',
+ reverse('wagtailadmin_pages:unlock', args=(page.id,)),
+ _("Unlock")
+ )
messages.warning(request, lock_message, extra_tags='lock')
elif page.locked and page_perms.page_locked():
@@ -402,6 +407,12 @@ def edit(request, page_id):
# Page was probably locked with an old version of Wagtail, or a script
lock_message = format_html(_("Page '{}' is locked."), page.get_admin_display_title())
+ if page_perms.can_unlock():
+ lock_message += format_html(
+ '',
+ reverse('wagtailadmin_pages:unlock', args=(page.id,)),
+ _("Unlock")
+ )
messages.error(request, lock_message, extra_tags='lock')
# Check for revisions still undergoing moderation and warn - this is for the old moderation system