Skip to content

Commit

Permalink
Update default & theme trustedContentSources
Browse files Browse the repository at this point in the history
Issue #1383
  • Loading branch information
robyngit committed Sep 30, 2024
1 parent 27bf4c5 commit 4fd47d5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/js/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1747,10 +1747,7 @@ define(["jquery", "underscore", "backbone"], function ($, _, Backbone) {
* @type {string[]}
* @since 0.0.0
*/
trustedContentSources: [
"https://www.youtube.com/embed/*",
"https://player.vimeo.com/video/*",
],
trustedContentSources: [],

/** If true, then archived content is available in the search index.
* Set to false if this MetacatUI is using a Metacat version before 2.10.0
Expand Down
6 changes: 6 additions & 0 deletions src/js/themes/arctic/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ MetacatUI.AppConfig = Object.assign(

//Google Analytics
googleAnalyticsKey: "G-12EKQM14SH",

// iFrames in portals
trustedContentSources: [
"https://*arcticdata.io",
"https://cosima.nceas.ucsb.edu*",
],
},
MetacatUI.AppConfig || {},
);
Expand Down
8 changes: 8 additions & 0 deletions src/js/themes/dataone/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ MetacatUI.AppConfig = Object.assign(
displayDatasetEditButton: false,
displayDatasetControls: false,
displayDatasetQualityMetric: true,

// iFrames in portals
trustedContentSources: [
"https://*ecoinformatics.org*",
"https://*arcticdata.io",
"https://cosima.nceas.ucsb.edu*",
"https://sasap-data.shinyapps.io/board_of_fisheries/",
],
},
MetacatUI.AppConfig || {},
);
Expand Down
7 changes: 7 additions & 0 deletions src/js/themes/knb/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ MetacatUI.AppConfig = Object.assign(
limitPortalsToSubjects: ["CN=knb-data-admins,DC=dataone,DC=org"],
portalEditNotAuthCreateMessage:
"Creating new portals is a feature currently only available to a select group of Beta testers. You should still be able to access your existing portals. Please contact us with any questions at the email address below.",

// iFrames in portals
trustedContentSources: [
"https://*ecoinformatics.org*",
"https://cosima.nceas.ucsb.edu*",
"https://sasap-data.shinyapps.io/board_of_fisheries/",
],
},
MetacatUI.AppConfig,
);
Expand Down

0 comments on commit 4fd47d5

Please sign in to comment.