Skip to content

Commit

Permalink
fix: Change logic to detect correct skipped page for permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Dec 19, 2024
1 parent c0f8f3d commit 5eb2405
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15633,9 +15633,19 @@ const guidedPennsieveDatasetUpload = async () => {
await guidedAddDatasetBannerImage(guidedBfAccount, guidedDatasetName, guidedBannerImagePath);
await guidedAddDatasetLicense(guidedBfAccount, guidedDatasetName, guidedLicense);
await guidedAddDatasetTags(guidedBfAccount, guidedDatasetName, guidedTags);
if (!pageIsSkipped("guided-pennsieve-intro-tab")) {
if (!pageIsSkipped("guided-designate-permissions-tab")) {
// Reconfirm that the user is not a guest before adding permissions
let guest = await window.isWorkspaceGuest();

let guest = false;

try {
guest = await window.isWorkspaceGuest();
} catch (error) {
const errorMessage = userErrorMessage(error);
log.error("Error checking if user is a guest during dataset upload", errorMessage);
throw new Error(errorMessage);
}

if (!guest) {
await guidedAddUserPermissions(guidedBfAccount, guidedDatasetName, guidedUsers);
await guidedAddTeamPermissions(guidedBfAccount, guidedDatasetName, guidedTeams);
Expand Down

0 comments on commit 5eb2405

Please sign in to comment.