Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC-3132: New revisionhistory_allow_restore option to control restoration of old revisions. #3615

Merged
merged 10 commits into from
Feb 19, 2025
Merged
18 changes: 18 additions & 0 deletions modules/ROOT/pages/7.7.0-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,24 @@ This caused confusion in identifying the problem during setup.

For information on the **Image Optimizer** plugin, see: xref:uploadcare.adoc[Image Optimizer].

=== Revision History

The {productname} {release-version} release includes an accompanying release of the **Revision History** premium plugin.

**Revision History** includes the following addition.

==== New `revisionhistory_allow_restore` option to control restoration of old revisions
// #TINY-11746

Previously, integrators had no way to control whether users could restore old revisions in the **Revision History** plugin.

{prductname} {release-version} introduces a new `revisionhistory_allow_restore` option, which provides integrators with a way to manage this behavior. By default, it is set to `+true+`, setting it to `+false+` prevents users from restoring previous versions.

This improvement enhances access control within the **Revision History** plugin, providing greater flexibility for managing revision restoration.

For more information, see: xref:revisionhistory.adoc[Revision History].


[[improvements]]
== Improvements

Expand Down
2 changes: 2 additions & 0 deletions modules/ROOT/pages/revisionhistory.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ include::partial$configuration/revisionhistory_fetch.adoc[leveloffset=+1]

include::partial$configuration/revisionhistory_fetch_revision.adoc[leveloffset=+1]

include::partial$configuration/revisionhistory_allow_restore.adoc[leveloffset=+1]

include::partial$configuration/revisionhistory_author.adoc[leveloffset=+1]

include::partial$configuration/revisionhistory_display_author.adoc[leveloffset=+1]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[[revisionhistory_allow_restore]]
== `revisionhistory_allow_restore`

The `revisionhistory_allow_restore` option enables or disables the ability to restore a revision from the Revision History view.

*Type:* `+Boolean+`

*Default vale:* `+true+`

=== Example: Using `revisionhistory_allow_restore`

[source,js]
----
tinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'revisionhistory',
toolbar: 'revisionhistory',
revisionhistory_fetch: () => Promise.resolve([]), // Required option for the plugin - replace with actual API request
revisionhistory_allow_restore: false
----
Loading