Problem/Motivation

Requested by Razem
After #3163292: Have revisionable media entities in Varbase by default
No UI way to view changes or revert them
Change log by admin audit trail

Steps to reproduce

Given that we had enabled the "Create new revision" for the Image media type

Automatically create new revisions. Users with the "Administer media" permission will be able to override this option.

Proposed resolution

Add and enable the Media Revisions UI module with Varbase Media
https://www.drupal.org/project/media_revisions_ui

Media entities support revisions however there is no interface to handle them.

This module adds "Revisions" tab in the "Edit" section of media which displays a list of revisions and allows viewing, reverting or deleting revisions.

Revisions page for media item

#3165781: Add permissions for [Media Revisions UI] module
Permissions for media revisions UI
Permissions for media  revisions UI

Remaining tasks

User interface changes

Have a UI tab when we edit media

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

Title: Add [Media Revisions UI] module » Add [Media Revisions UI] module ~2.0

  • RajabNatshah committed 7093486 on 8.x-7.x
    Issue #3163490: Add [Media Revisions UI] module ~2.0
    
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

The following is in core

Permission

view all media revisions:
  title: 'View all media revisions'
  description: 'To view a revision, you also need permission to view the media item.'

Route

entity.media.revision:
 path: '/media/{media}/revisions/{media_revision}/view'

But it can view any revision id in the URL for a selected media id.
It may show data for other media items or types too

mohammed j. razem’s picture

We will still need the module Media Revision UI so it can provide the UI to revert, and see the history of revisions.

As for the perms:
- Delete is not given to any role
- View is given to Editor upwards
- Revert is given to Content admin and Site admin only

This is similar to the content revisions.

rajab natshah’s picture

rajab natshah’s picture

  • RajabNatshah committed 2146123 on 8.x-7.x
    Issue #3163490 by Mohammed J. Razem: Hide the revision but do not set to...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Active » Needs review
Issue tags: +varbase-8.8.6, +varbase-9.0.0
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned

  • RajabNatshah committed 78ce6a1 on 8.x-7.x
    Issue #3163490: Hide the revision but do not set to #access FALSE so new...
rajab natshah’s picture

Status: Needs review » Needs work

Needs to add the list of permissions in Varbase profile

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Needs work » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)
rajab natshah’s picture

Issue summary: View changes