Skip to content

Commit

Permalink
fix: Show empty teams permission dropdown for guest accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Feb 2, 2024
1 parent f9d8945 commit 8ac463b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/renderer/src/scripts/others/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3866,10 +3866,15 @@ const refreshBfTeamsList = async (teamList) => {

if (accountSelected !== "Select") {
try {
const teamsReq = await client.get(
`manage_datasets/ps_get_teams?selected_account=${window.defaultBfAccount}`
);
const teamsThatCanBeGrantedPermissions = window.getSortedTeamStrings(teamsReq.data.teams);
let teamsThatCanBeGrantedPermissions = [];
try {
const teamsReq = await client.get(
`manage_datasets/ps_get_teams?selected_account=${window.defaultBfAccount}`
);
teamsThatCanBeGrantedPermissions = window.getSortedTeamStrings(teamsReq.data.teams);
} catch (error) {
const emessage = userErrorMessage(error);
}

// The window.removeOptions() wasn't working in some instances (creating a double list) so second removal for everything but the first element.
$("#bf_list_teams").selectpicker("refresh");
Expand Down

0 comments on commit 8ac463b

Please sign in to comment.