Skip to content

Commit

Permalink
/blocks/adp-asset-details-modal/adp-asset-details-modal.js: Hides the…
Browse files Browse the repository at this point in the history
… express button for licensed content
  • Loading branch information
TyroneAEM committed Mar 11, 2024
1 parent 81d9f7d commit 74ce284
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions blocks/adp-asset-details-modal/adp-asset-details-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { closeModal } from '../../scripts/shared.js';
import { authorizeURL, getAssetMetadata } from '../../scripts/polaris.js';
import {
getAssetName, getAssetMimeType, getAssetTitle,
getAssetName, getAssetMimeType, getAssetTitle, isLicensedContent,
} from '../../scripts/metadata.js';
// eslint-disable-next-line import/no-cycle
import { disableActionButtons } from '../adp-asset-details-panel/adp-asset-details-panel.js';
Expand Down Expand Up @@ -96,7 +96,8 @@ function createHeaderPanel(modal) {
// ensure express button only shows for valid asset types
const expressBtn = modal.querySelector('.action-edit-asset');
const validCheck = fileValidity(format);
if (isCCEConfigured() && validCheck.isValid) {
if (isCCEConfigured() && validCheck.isValid && !isLicensedContent(assetJSON)) {
//Only show express button for content that is not licensed.

Check failure on line 100 in blocks/adp-asset-details-modal/adp-asset-details-modal.js

View workflow job for this annotation

GitHub Actions / build

Expected exception block, space or tab after '//' in comment
expressBtn.classList.remove('hidden');
} else if (!expressBtn.classList.contains('hidden')) {
expressBtn.classList.add('hidden');
Expand Down

0 comments on commit 74ce284

Please sign in to comment.