fix: actually disable backup buttons if the user is not entitled (#955)
This commit is contained in:
@@ -54,6 +54,9 @@ export const CloudBackupProvider: FunctionComponent<Props> = ({
|
||||
};
|
||||
|
||||
const installIntegration = (event: Event) => {
|
||||
if (!isEntitledToCloudBackups) {
|
||||
return;
|
||||
}
|
||||
event.stopPropagation();
|
||||
|
||||
const authUrl = application.getCloudProviderIntegrationUrl(
|
||||
@@ -223,6 +226,7 @@ export const CloudBackupProvider: FunctionComponent<Props> = ({
|
||||
label="Enable"
|
||||
className={`px-1 text-xs min-w-40 ${additionalClass}`}
|
||||
onClick={installIntegration}
|
||||
disabled={!isEntitledToCloudBackups}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -98,6 +98,9 @@ export const CloudLink: FunctionComponent<Props> = ({ application }) => {
|
||||
};
|
||||
|
||||
const toggleMuteFailedCloudBackupEmails = async () => {
|
||||
if (!isEntitledToCloudBackups) {
|
||||
return;
|
||||
}
|
||||
const previousValue = isFailedCloudBackupEmailMuted;
|
||||
setIsFailedCloudBackupEmailMuted(!isFailedCloudBackupEmailMuted);
|
||||
|
||||
@@ -165,6 +168,7 @@ export const CloudLink: FunctionComponent<Props> = ({ application }) => {
|
||||
<Switch
|
||||
onChange={toggleMuteFailedCloudBackupEmails}
|
||||
checked={!isFailedCloudBackupEmailMuted}
|
||||
disabled={!isEntitledToCloudBackups}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user