mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: don't show promote button for members (#17511)
Fix https://github.com/coder/coder/issues/15850
This commit is contained in:
@@ -33,7 +33,6 @@ export const VersionRow: FC<VersionRowProps> = ({
|
||||
});
|
||||
|
||||
const jobStatus = version.job.status;
|
||||
const showActions = onPromoteClick || onArchiveClick;
|
||||
|
||||
return (
|
||||
<TimelineEntry
|
||||
@@ -106,7 +105,7 @@ export const VersionRow: FC<VersionRowProps> = ({
|
||||
</Pill>
|
||||
)}
|
||||
|
||||
{showActions && jobStatus === "failed" ? (
|
||||
{jobStatus === "failed" && onArchiveClick && (
|
||||
<Button
|
||||
css={styles.promoteButton}
|
||||
disabled={isActive || version.archived}
|
||||
@@ -118,7 +117,9 @@ export const VersionRow: FC<VersionRowProps> = ({
|
||||
>
|
||||
Archive…
|
||||
</Button>
|
||||
) : (
|
||||
)}
|
||||
|
||||
{jobStatus === "succeeded" && onPromoteClick && (
|
||||
<Button
|
||||
css={styles.promoteButton}
|
||||
disabled={isActive || jobStatus !== "succeeded"}
|
||||
|
||||
Reference in New Issue
Block a user