Skip to content

Commit

Permalink
Hide edit media button when user can't update
Browse files Browse the repository at this point in the history
jimsafley committed Jul 8, 2024
1 parent 1ff6073 commit 284af28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions application/view/omeka/admin/media/show.phtml
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@ $sectionNavs = [

<div id="page-actions">
<?php $this->trigger('view.show.page_actions', ['resource' => $media]); ?>
<?php if ($media->userIsAllowed('update')): ?>
<?php echo $media->link($translate('Edit media'), 'edit', ['class' => 'button']); ?>
<?php endif; ?>
</div>

<?php echo $this->sectionNav($sectionNavs, 'view.show.section_nav', $media); ?>

0 comments on commit 284af28

Please sign in to comment.