Fleet UI: Hide edit tarballs package (#28965)

This commit is contained in:
RachelElysia 2025-05-08 12:26:35 -04:00 committed by GitHub
parent 844723bfbc
commit fe087db01b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -260,6 +260,8 @@ const PackageForm = ({
const ext = getExtensionFromFileName(formData?.software?.name || "");
const isExePackage = ext === "exe";
const isTarballPackage = ext === "tar.gz";
// We currently don't support replacing a tarball package
const canEditFile = isEditingSoftware && !isTarballPackage;
// If a user preselects automatic install and then uploads a .exe
// which automatic install is not supported, the form will default
@ -279,7 +281,7 @@ const PackageForm = ({
<div className={classNames}>
<form className={`${baseClass}__form`} onSubmit={onFormSubmit}>
<FileUploader
canEdit={isEditingSoftware}
canEdit={canEditFile}
graphicName="file-pkg"
accept={ACCEPTED_EXTENSIONS}
message=".pkg, .msi, .exe, .deb, .rpm, or .tar.gz"