Apply permission check for create accesskey button (#2822)
This commit is contained in:
committed by
GitHub
parent
629dd669c4
commit
beed4895c1
@@ -247,15 +247,22 @@ const Account = () => {
|
||||
disabled={userIDP}
|
||||
/>
|
||||
</SecureComponent>
|
||||
<Button
|
||||
id={"create-service-account"}
|
||||
onClick={() => {
|
||||
navigate(`${IAM_PAGES.ACCOUNT_ADD}`);
|
||||
}}
|
||||
label={`Create access key`}
|
||||
icon={<AddIcon />}
|
||||
variant={"callAction"}
|
||||
/>
|
||||
<SecureComponent
|
||||
scopes={[IAM_SCOPES.ADMIN_CREATE_SERVICEACCOUNT]}
|
||||
resource={CONSOLE_UI_RESOURCE}
|
||||
matchAll
|
||||
errorProps={{ disabled: true }}
|
||||
>
|
||||
<Button
|
||||
id={"create-service-account"}
|
||||
onClick={() => {
|
||||
navigate(`${IAM_PAGES.ACCOUNT_ADD}`);
|
||||
}}
|
||||
label={`Create access key`}
|
||||
icon={<AddIcon />}
|
||||
variant={"callAction"}
|
||||
/>
|
||||
</SecureComponent>
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user