Skip to content

Commit

Permalink
MAT-6744 allowing shared users to edit library
Browse files Browse the repository at this point in the history
  • Loading branch information
sb-prateekkeerthi committed Mar 8, 2024
1 parent 255c50a commit bcea2ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/cqlLibraryList/CqlLibraryList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ export default function CqlLibraryList({ cqlLibraryList, onListUpdate }) {
const [anchorEl, setAnchorEl] = useState(null);
const [selectedCQLLibrary, setSelectedCqlLibrary] =
useState<CqlLibrary>(null);
const isOwner = checkUserCanEdit(selectedCQLLibrary?.librarySet?.owner, []);
const isOwner = checkUserCanEdit(
selectedCQLLibrary?.librarySet?.owner,
selectedCQLLibrary?.librarySet?.acls
);
const handleOpen = (
selected: CqlLibrary,
event: React.MouseEvent<HTMLButtonElement>
Expand Down
5 changes: 4 additions & 1 deletion src/components/editCqlLibrary/EditCqlLibrary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ const EditCqlLibrary = () => {
const [toastType, setToastType] = useState<string>("danger");
const [discardDialogOpen, setDiscardDialogOpen] = useState<boolean>(false);
const { updateRouteHandlerState } = routeHandlerStore;
const isOwner = checkUserCanEdit(loadedCqlLibrary?.librarySet?.owner, []);
const isOwner = checkUserCanEdit(
loadedCqlLibrary?.librarySet?.owner,
loadedCqlLibrary?.librarySet?.acls
);

const onToastClose = () => {
setToastType(null);
Expand Down

0 comments on commit bcea2ab

Please sign in to comment.