Skip to content

Commit

Permalink
refactor: remove redundnact guest check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Dec 16, 2024
1 parent 8dd6b5c commit bb71fca
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -8048,13 +8048,6 @@ window.guidedResumeProgress = async (datasetNameToResume) => {
guidedSkipPage(pageID);
}

let guest = await window.isWorkspaceGuest();
if (!guest) {
guidedUnSkipPage("guided-designate-permissions-tab");
} else {
guidedSkipPage("guided-designate-permissions-tab");
}

// check if the user is an editor
let userDatasetRole = await api.getDatasetRole(
window.sodaJSONObj["bf-dataset-selected"]["dataset-name"]
Expand All @@ -8066,12 +8059,17 @@ window.guidedResumeProgress = async (datasetNameToResume) => {
guidedSkipPage("guided-assign-license-tab");
} else {
guidedUnSkipPage("guided-banner-image-tab");
if (!guest) {
guidedUnSkipPage("guided-designate-permissions-tab");
}
guidedUnSkipPage("guided-designate-permissions-tab");
guidedUnSkipPage("guided-assign-license-tab");
}

let guest = await window.isWorkspaceGuest();
if (!guest) {
guidedUnSkipPage("guided-designate-permissions-tab");
} else {
guidedSkipPage("guided-designate-permissions-tab");
}

// Skip this page incase it was not skipped in a previous session
guidedSkipPage("guided-select-starting-point-tab");

Expand Down

0 comments on commit bb71fca

Please sign in to comment.