Skip to content

Commit

Permalink
Enable "Download into Bloom for editing" button in production
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-polk committed Jul 1, 2024
1 parent f38f6a1 commit c35f583
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/components/BookDetail/BookOwnerControlsBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ import {
useGetPermissions,
} from "../../connection/LibraryQueryHooks";

// This should become true or just be removed once 6.0 is shipping.
// The controls it hides require 6.0, so we don't want ordinary users to see them until then.
// We do want to be able to test this on our dev and alpha sites, though.
const allowDownloadForEditing =
window.location.hostname.startsWith("alpha") ||
window.location.hostname.startsWith("dev") ||
window.location.hostname.startsWith("localhost");

export const BookOwnerControlsBox: React.FunctionComponent<{
book: Book;
user: User;
Expand Down Expand Up @@ -77,8 +69,8 @@ export const BookOwnerControlsBox: React.FunctionComponent<{
// So for now, we must only show these controls when they will work (moderator or uploader).
userIsUploader;
//permissions.editSurfaceMetadata === true;
const showDownloadForEditButton =
allowDownloadForEditing && permissions.reupload === true;

const showDownloadForEditButton = permissions.reupload === true;
const showDeleteButton = userIsModerator || permissions.delete === true;

return (
Expand Down

0 comments on commit c35f583

Please sign in to comment.