@@ -30,7 +30,7 @@ const AnimatedDeployButton = ({
30
30
isLoading,
31
31
isVirtualEnvironment,
32
32
onButtonClick,
33
- canDeployWithoutApproval ,
33
+ exceptionUserConfig ,
34
34
isBulkCDTrigger,
35
35
} : AnimatedDeployButtonProps ) => {
36
36
const audioRef = useRef < HTMLAudioElement > ( null )
@@ -42,6 +42,7 @@ const AnimatedDeployButton = ({
42
42
rotate : 45 ,
43
43
} ,
44
44
}
45
+ const isExceptionUser = exceptionUserConfig ?. canDeploy || exceptionUserConfig ?. isImageApprover
45
46
46
47
const handleButtonClick = async ( e : SyntheticEvent ) => {
47
48
if ( clicked ) {
@@ -74,7 +75,7 @@ const AnimatedDeployButton = ({
74
75
dataTestId = "cd-trigger-deploy-button"
75
76
isLoading = { isLoading }
76
77
text = {
77
- canDeployWithoutApproval
78
+ exceptionUserConfig ?. canDeploy
78
79
? 'Deploy without approval'
79
80
: `Deploy${ isVirtualEnvironment ? ' to isolated env' : '' } `
80
81
}
@@ -99,12 +100,12 @@ const AnimatedDeployButton = ({
99
100
}
100
101
size = { ComponentSizeType . large }
101
102
onClick = { handleButtonClick }
102
- style = { canDeployWithoutApproval && ! isBulkCDTrigger ? ButtonStyleType . warning : ButtonStyleType . default }
103
- showTooltip = { canDeployWithoutApproval }
103
+ style = { isExceptionUser && ! isBulkCDTrigger ? ButtonStyleType . warning : ButtonStyleType . default }
104
+ showTooltip = { isExceptionUser }
104
105
tooltipProps = { {
105
106
content : isBulkCDTrigger
106
- ? 'Non-approved image(s) are selected for some applications. You are authorized to deploy. '
107
- : 'A non-approved image is selected. You are authorized to deploy. ' ,
107
+ ? 'You are authorized to deploy as an exception user for some applications '
108
+ : 'You are authorized to deploy as an exception user ' ,
108
109
} }
109
110
/>
110
111
{ /* Disabling es-lint as captions are not required */ }
0 commit comments