Skip to content

Commit

Permalink
[chore] Remove unmanaged sites logic
Browse files Browse the repository at this point in the history
  • Loading branch information
williambelle committed Jan 30, 2025
1 parent 78f12db commit 8d4dc8b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 61 deletions.
13 changes: 2 additions & 11 deletions app/imports/api/methods/sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,8 @@ const validateConsistencyOfFields = (newSite) => {
}

// Check if subdomains-lite site datas are OK
if (
newSite.openshiftEnv === "subdomains-lite" ||
newSite.openshiftEnv.startsWith("unm-") ||
newSite.theme === "wp-theme-light"
) {
if (
!(
(newSite.openshiftEnv === "subdomains-lite" || newSite.openshiftEnv.startsWith("unm-")) &&
newSite.theme === "wp-theme-light"
)
) {
if (newSite.openshiftEnv === "subdomains-lite" || newSite.theme === "wp-theme-light") {
if (!(newSite.openshiftEnv === "subdomains-lite" && newSite.theme === "wp-theme-light")) {
throwMeteorErrors(
["theme", "openshiftEnv"],
"Site subdomains-lite: Les champs thème et environnement OpenShift ne sont pas cohérents"
Expand Down
4 changes: 1 addition & 3 deletions app/imports/ui/components/sites/Add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ class Add extends Component {
// Display 'Normalize button' if
// - user edit current site (no when user add a new site)
// - the current site belongs to WordPress Infra
// - the current site is not an unmanaged
return (
this.state.action === "edit" &&
initialValues.wpInfra &&
!initialValues.openshiftEnv.startsWith("unm-")
initialValues.wpInfra
);
};

Expand Down
23 changes: 0 additions & 23 deletions app/private/openshiftenvs_update.csv

This file was deleted.

24 changes: 0 additions & 24 deletions app/private/unmanaged.csv

This file was deleted.

0 comments on commit 8d4dc8b

Please sign in to comment.